Question: Use esearch/efetch to output relationship table of GSM to SRR (bascially SRA file names)
0
gravatar for predeus
6.1 years ago by
predeus1.4k
Russia
predeus1.4k wrote:

Hello all,

I want to use NCBI command line utilities (esearch, efetch, etc) to achieve the following: given the GSE ID, I want a simple tab-separated output, giving you GSM experiment in column 1, and SRR file name in column 2. Ideally, it would also be collapsed by GSM ID (in cases when you have more than 1 sra file per GSM).

I'm reading through numerous pages of manuals that are relatively obscure for people without much experience with databases, so if you can help me to figure this out, I'd be most grateful :)

Thank you in advance!

ncbi geo-omnibus geo • 3.2k views
ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by predeus1.4k
1
gravatar for predeus
6.1 years ago by
predeus1.4k
Russia
predeus1.4k wrote:

Ok I've figured it out. To get GSM to SRR relationship, you can use this:

esearch -db sra -query "GSM123456" | efetch -format docsum | xtract -pattern DocumentSummary -element Runs | perl -ne '@mt = ($_ =~ /SRR\d+/g); print "@mt\n"'

note that it will also print multiple SRR IDs in one line (if you have more than one sra file per GSM).

ADD COMMENTlink modified 5 months ago by RamRS27k • written 6.1 years ago by predeus1.4k

Can you give more information on

  1. if we should have a perl script to run the command?
  2. if it can be run in cygwin
  3. a url to the perl script if one exists.

Thank you.

ADD REPLYlink modified 5 months ago by RamRS27k • written 5.8 years ago by an0

Hello,

here's the description for the scripts I mentioned: http://www.ncbi.nlm.nih.gov/books/NBK179288/

They are called "Entrez direct" I believe.

Hope this helps,

-- Alex

ADD REPLYlink modified 5 months ago by RamRS27k • written 5.8 years ago by predeus1.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 764 users visited in the last hour