This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to download all reference files with ensembl and taxon ID?

Hello,

I would like to download all the reference sequences of viruses deposited. I remember this could be done with esearch/efetch and the taxon ID of the species of interest (I believe viruses have ID 10239).

I am trying with:

esearch -db taxonomy -query 10239 | efetch -format=fasta > ref.fa

but I am not getting anything.

What would be the correct syntax?

Thank you

sequence ensembl efetch esearch

1 answer

I have found it:

esearch -db "nucleotide" -query "txid10239 [Organism] AND refseq[filter]" | efetch -format fasta > ref.fa

Case closed.

Log in to answer this question.