Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolan Woods authored Feb 25, 2022
1 parent 957b295 commit 73473ea
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@ Examples:

[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(@)) )] | []

Convert dataset to faa format using fasta output::

[0].let({org: (annotations.organism || annotations.source)}, &(features[?type=='CDS' && qualifiers.translation].{id:
join('|', [
(qualifiers.db_xref[?starts_with(@, 'GI')].['gi', split(':', @)[1]]),
(qualifiers.protein_id[*].['ref', @]),
(qualifiers.locus_tag[*].['locus', @]),
join('', [':', [location][?strand==`-1`] && 'c' || '', to_string(sum([location.start, `1`])), '..', to_string(location.end)])
][][]),
seq: qualifiers.translation[0],
description: (org && join('', [qualifiers.product[0], ' [', org, ']']) || qualifiers.product[0])}))
Convert dataset to faa format using fasta output::

[0].let({org: (annotations.organism || annotations.source)}, &(features[?type=='CDS' && qualifiers.translation].{id:
join('|', [
(qualifiers.db_xref[?starts_with(@, 'GI')].['gi', split(':', @)[1]]),
(qualifiers.protein_id[*].['ref', @]),
(qualifiers.locus_tag[*].['locus', @]),
join('', [':', [location][?strand==`-1`] && 'c' || '', to_string(sum([location.start, `1`])), '..', to_string(location.end)])
][][]),
seq: qualifiers.translation[0],
description: (org && join('', [qualifiers.product[0], ' [', org, ']']) || qualifiers.product[0])}))

See CONTRIBUTING.rst_ for information on contributing to this repo.

Expand All @@ -101,4 +101,4 @@ See CONTRIBUTING.rst_ for information on contributing to this repo.
.. _JMESPath playground: https://glenveegee.github.io/jmespath-edit/
.. _split(): https://github.com/jmespath/jmespath.py/issues/159
.. _let(): https://github.com/jmespath/jmespath.site/pull/6
.. _SeqFeature.extract(): https://biopython.org/docs/latest/api/Bio.SeqFeature.html#Bio.SeqFeature.SeqFeature.extract
.. _SeqFeature.extract(): https://biopython.org/docs/latest/api/Bio.SeqFeature.html#Bio.SeqFeature.SeqFeature.extract

0 comments on commit 73473ea

Please sign in to comment.