Problem using efetch -format acc, not the right accessions returned
1
0
Entering edit mode
20 months ago
Lei ▴ 20

I am trying to download a large list of SRA accessions through a search.

esearch -db sra -query "txid28901[Organism:exp]

returns 560039 entries. However, when I pipe it to efetch, the SRAs returned are not part of the results.

esearch -db sra -query "txid28901[Organism:exp]" | efetch -format acc -start 1 -stop 2

returns BZ591349.1 and BZ590319.1, which are not the organism I want. I only used start/stop as an example, but without it this command seemingly downloads ALL the SRA accessions.

Using

esearch -db sra -query "txid28901[Organism:exp]" | efetch -format runinfo -start 1 -stop 2

returns the correct runs but I only want the first column, the Run without having to download the whole file, which is large for 500k.

Am I using efetch incorrectly?

efetch esearch edirect entrez • 566 views
ADD COMMENT
2
Entering edit mode
20 months ago
GenoMax 147k

Try this:

$ esearch -db sra -query "txid28901[Organism:exp]" | efetch -format runinfo -mode xml | xtract -pattern Row -element Run

SRR24015960
SRR24015937
SRR24015945
SRR24015948
SRR24015939
ADD COMMENT
0
Entering edit mode

That worked thank you!! Now the slow process of downloading...

ADD REPLY

Login before adding your answer.

Traffic: 2510 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6