SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
bcf file table output Giffredo Bioinformatics 0 02-26-2014 07:28 AM
sam-dump -u from sra file fails to output unaligned reads yishaishimoni Bioinformatics 0 02-08-2013 12:47 PM
What does the '#bin' mean in UCSC table browser output file? gary Bioinformatics 2 06-28-2012 06:28 PM
Biopython, entrez.efetch, how to get results file umnklang Bioinformatics 1 06-15-2012 12:54 AM
SRA - SRR*.lite.sra adrian Bioinformatics 2 03-19-2012 09:43 AM

Reply
 
Thread Tools
Old 06-07-2014, 10:33 AM   #1
apredeus
Senior Member
 
Location: Bioinformatics Institute, SPb

Join Date: Jul 2012
Posts: 151
Default Use esearch/efetch to output relationship table of GSM to SRR (SRA file names)

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!
apredeus is offline   Reply With Quote
Old 06-07-2014, 04:20 PM   #2
apredeus
Senior Member
 
Location: Bioinformatics Institute, SPb

Join Date: Jul 2012
Posts: 151
Default

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).
apredeus is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 02:09 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO