Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added taxon to RefSeq genome FASTA files example #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,18 @@ efetch -format xml | \
xtract -pattern PubmedArticle -element MedlineCitation/PMID \
-block PubDate -sep " " -element Year,Month MedlineDate
```

### Given a taxon name, retrieve all RefSeq genomes for that taxon in FASTA format

Description (optional): Takes in the scientific name of a taxon on the command line (should usually be species or strain level to keep number of results manageable), retrieves taxID using `esearch | efetch | xtract`, which is nested by process substitution into `elink | efilter | efetch`.
Written by: Peter Skewes-Cox (8/25/2017)
Confirmed by:
Databases: taxonomy, nuccore

```
elink -db taxonomy -id $( esearch -db taxonomy -query "Hepatitis C virus" | \
efetch -format docsum | \
xtract -pattern DocumentSummary -element TaxId ) -target nuccore | \
efilter -query "refseq" | \
efetch -format fasta
```