@@ -80,17 +80,17 @@ Examples:
8080
8181 [0].[join(' - 1..', [description, to_string(length(seq))]), join(' ', [to_string(length(features[?type=='CDS' && qualifiers.translation])), 'proteins']), join(`"\t"`, ['Location', 'Strand', 'Length', 'PID', 'Gene', 'Synonym', 'Code', 'COG', 'Product']), (features[?type=='CDS' && qualifiers.translation].[join('..', [to_string(sum([location.start, `1`])), to_string(location.end)]), [location.strand][?@==`1`] && '+' || '-', length(qualifiers.translation[0]), (qualifiers.db_xref[?starts_with(@, 'GI')].split(':', @)[1])[0] || '-', qualifiers.gene[0] || '-', qualifiers.locus_tag[0] || '-', '-', '-', qualifiers.product[0] ] | [*].join(`"\t"`, [*].to_string(@)) )] | []
8282
83- Convert dataset to faa format using fasta output::
84-
85- [0].let({org: (annotations.organism || annotations.source)}, &(features[?type=='CDS' && qualifiers.translation].{id:
86- join('|', [
87- (qualifiers.db_xref[?starts_with(@, 'GI')].['gi', split(':', @)[1]]),
88- (qualifiers.protein_id[*].['ref', @]),
89- (qualifiers.locus_tag[*].['locus', @]),
90- join('', [':', [location][?strand==`-1`] && 'c' || '', to_string(sum([location.start, `1`])), '..', to_string(location.end)])
91- ][][]),
92- seq: qualifiers.translation[0],
93- description: (org && join('', [qualifiers.product[0], ' [', org, ']']) || qualifiers.product[0])}))
83+ Convert dataset to faa format using fasta output::
84+
85+ [0].let({org: (annotations.organism || annotations.source)}, &(features[?type=='CDS' && qualifiers.translation].{id:
86+ join('|', [
87+ (qualifiers.db_xref[?starts_with(@, 'GI')].['gi', split(':', @)[1]]),
88+ (qualifiers.protein_id[*].['ref', @]),
89+ (qualifiers.locus_tag[*].['locus', @]),
90+ join('', [':', [location][?strand==`-1`] && 'c' | | '', to_string(sum([location.start, `1 `])), '..', to_string(location.end)])
91+ ][][]),
92+ seq: qualifiers.translation[0],
93+ description: (org && join('', [qualifiers.product[0], ' [', org, ']']) || qualifiers.product[0])}))
9494
9595See CONTRIBUTING.rst _ for information on contributing to this repo.
9696
@@ -101,4 +101,4 @@ See CONTRIBUTING.rst_ for information on contributing to this repo.
101101.. _JMESPath playground : https://glenveegee.github.io/jmespath-edit/
102102.. _split() : https://github.com/jmespath/jmespath.py/issues/159
103103.. _let() : https://github.com/jmespath/jmespath.site/pull/6
104- .. _SeqFeature.extract() : https://biopython.org/docs/latest/api/Bio.SeqFeature.html#Bio.SeqFeature.SeqFeature.extract
104+ .. _SeqFeature.extract() : https://biopython.org/docs/latest/api/Bio.SeqFeature.html#Bio.SeqFeature.SeqFeature.extract
0 commit comments