@@ -144,15 +144,15 @@ def test_creation(self):
144144 """
145145 output_path = Path (self .workdir .name , 'faa' )
146146 convert (self .input_path , self .input_type , output_path , 'fasta' , jpath = """
147- [0].let({org : (annotations.organism || annotations.source)}, &( features[?type=='CDS' && qualifiers.translation].{id:
147+ [0].let({organism : (annotations.organism || annotations.source)}, &features[?type=='CDS' && qualifiers.translation].{id:
148148join('|', [
149149 (qualifiers.db_xref[?starts_with(@, 'GI')].['gi', split(':', @)[1]]),
150150 (qualifiers.protein_id[*].['ref', @]),
151151 (qualifiers.locus_tag[*].['locus', @]),
152152 join('', [':', [location][?strand==`-1`] && 'c' || '', to_string(sum([location.start, `1`])), '..', to_string(location.end)])
153153][][]),
154154seq: qualifiers.translation[0],
155- description: (org && join('', [qualifiers.product[0], ' [', org , ']']) || qualifiers.product[0])}) )
155+ description: (organism && join('', [qualifiers.product[0] || qualifiers.protein_id[0] , ' [', organism , ']']) || qualifiers.product[0])})
156156 """ )
157157 self .compare_files (Path .joinpath (self .output_path , 'faa' ), output_path )
158158
0 commit comments