Skip to content

Commit 957b295

Browse files
author
Nolan Woods
committed
Update creation test
1 parent 962eb3a commit 957b295

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
148148
join('|', [
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
][][]),
154154
seq: 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

Comments
 (0)