@@ -112,7 +112,7 @@ def _create_gene(feature, gene_accession):
112112 description = None
113113
114114 # Non mandatory - Ensembl doesn't have some stuff on some RNAs
115- if feature .type in {"gene" , "pseudogene" }:
115+ if feature .type in {"gene" , "pseudogene" , "ncRNA_gene" }:
116116 gene_name = feature .attr .get ("Name" )
117117 description = feature .attr .get ("description" )
118118 else :
@@ -178,7 +178,7 @@ def _add_transcript_data(self, transcript_accession, transcript, feature):
178178
179179 def _finish_process_features (self ):
180180 for transcript_accession , transcript_data in self .transcript_data_by_accession .items ():
181- features_by_type = self .transcript_features_by_type .get (transcript_accession )
181+ features_by_type = self .transcript_features_by_type .get (transcript_accession , {} )
182182
183183 # Store coding start/stop transcript positions
184184 # For RefSeq, we need to deal with alignment gaps, so easiest is to convert exons w/o gaps
@@ -194,7 +194,7 @@ def _finish_process_features(self):
194194 exons_stranded_order = self ._create_cdna_exons (cdna_matches_stranded_order )
195195
196196 else :
197- raw_exon_stranded_order = features_by_type [ "exon" ]
197+ raw_exon_stranded_order = features_by_type . get ( "exon" , [])
198198 raw_exon_stranded_order .sort (key = operator .itemgetter (0 ))
199199 if not forward_strand :
200200 raw_exon_stranded_order .reverse ()
@@ -412,7 +412,7 @@ class GFF3Parser(GFFParser):
412412
413413 """
414414
415- GFF3_GENES = {"gene" , "pseudogene" }
415+ GFF3_GENES = {"gene" , "pseudogene" , "ncRNA_gene" }
416416 GFF3_TRANSCRIPTS_DATA = {"exon" , "CDS" , "cDNA_match" , "five_prime_UTR" , "three_prime_UTR" }
417417
418418 def __init__ (self , * args , ** kwargs ):
0 commit comments