Get corresponding SRA accessions for very large list of Biosample accesions?
1
0
Entering edit mode
3.2 years ago

I have ~1000 Biosample accessions in a list and I want to get the SRA accession numbers for each of them without doing it manually. Any easy script to do this sort of thing?

I see searching biostars you can easily do the opposite with Enterez direct:

esearch -db sra -query 'SRR5437876' | elink -target biosample | efetch

but swapping out biosample and sra gives me too much extra data to sift through (see below):

esearch -db biosample -query 'SRR5437876' | elink -target sra | efetch

I just want the SRA number

Thanks!

NCBI Enterez direct • 817 views
ADD COMMENT
0
Entering edit mode
3.2 years ago
GenoMax 147k

You can do this with EntrezDirect:

$ esearch -db sra -query SAMN06710536 | efetch -format runinfo | cut -f1 -d ","
Run
SRR5437874
SRR5437875
SRR5437876
SRR5437877
ADD COMMENT

Login before adding your answer.

Traffic: 2137 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