File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
databases/ensembl/helpers Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ def locus_description(entry):
102
102
return '{species} {rna_type} {locus_tag}' .format (
103
103
species = species ,
104
104
rna_type = entry .rna_type .replace ('_' , ' ' ),
105
- locus_tag = entry .locus_tag ,
106
- )
105
+ locus_tag = entry .locus_tag or '' ,
106
+ ). strip ()
107
107
108
108
109
109
def description (summary , feature , entry ):
Original file line number Diff line number Diff line change @@ -231,3 +231,12 @@ def test_it_always_has_valid_rna_types(self):
231
231
def test_it_never_has_bad_vault (self ):
232
232
for entry in self .data ():
233
233
assert entry .rna_type != 'vaultRNA'
234
+
235
+
236
+ class OtherTests (Base ):
237
+ filename = 'data/ensembl/Macaca_mulatta.Mmul_8.0.1.92.chromosome.1.dat'
238
+ importer_class = EnsemblParser
239
+
240
+ def test_does_not_append_none_to_description (self ):
241
+ print (self .features .keys ()[0 :10 ])
242
+ assert self .entry_for ('ENSMMUT00000062476.1' ).description == 'Macaca mulatta (rhesus monkey) lncRNA'
Original file line number Diff line number Diff line change @@ -34,11 +34,10 @@ def setUpClass(cls):
34
34
key = None
35
35
if helpers .is_gene (feature ):
36
36
key = helpers .gene (feature )
37
- elif not helpers .is_ncrna (feature ):
38
- continue
37
+ elif helpers .is_ncrna (feature ):
38
+ key = helpers .transcript (feature ) or \
39
+ helpers .standard_name (feature )
39
40
40
- if helpers .is_transcript (feature ):
41
- key = helpers .transcript (feature )
42
41
if not key :
43
42
continue
44
43
cls .features [key ] = feature
You can’t perform that action at this time.
0 commit comments