you don't need esearch. efetch works with ACN: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NM_178642,NM_181402&rettype=fasta
• 0 views
•
link
I have a list of Refseq IDs such as:
[1] "NM_010220" "NM_001290393" "NM_007743" "NM_175344" "NM_029432"
[6] "NM_001111121" "NM_153399" "NM_007592" "NM_181402" "NM_013737"
11] "NM_007737" "NM_029967" "NM_146062" "NM_019477" "NM_172746"
16] "NM_024188" "NM_001294143" "NM_178642" "NM_001081007" "NM_011359"
What I wanted is to download the sequences (RNA) of these Refseq IDs. How to do this in R or through Linux terminals?
Using NCBI eUtils:
esearch -db nucleotide -query "Your_acc_#" | efetch -format fasta > Your_acc.fa
or
efetch -db nucleotide -id Your_acc_# -format fasta > Your_acc.fa
Edit: As @Pierre mentions below, you could get all of them via a single query, but will have to split the files up afterwards if you need them in individual files.
you don't need esearch. efetch works with ACN: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NM_178642,NM_181402&rettype=fasta
Log in to answer this question.
this has been asked many times on this site.
Hi ddzhangzz,
There is no need to delete your post, definitely not after it received an answer.
If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.
Cheers,
Wouter