Url To Download Sra Experiment_Package Xml File Programmatically
2
2
Entering edit mode
13.9 years ago
Tim ▴ 350

Given the following Experiment description page from SRA: http://www.ncbi.nlm.nih.gov/sra/SRX001682?report=fullXML

How can I download the visualized XML file as actual XML?

It's driving me crazy that I can only get this weird HTML layout, when what I want is the XML file to parse and transform automatically, without the manual copy&paste step in between.

The page offers a heavily JavaScripted form at the bottom to download as file, but no direct link to that XML file.

xml sra • 5.5k views
ADD COMMENT
3
0
Entering edit mode

Thanks, that works fine! Any notes on where you found the URL and how to find similar URLs for the SRA?

ADD REPLY
0
Entering edit mode

i guess http://www.ncbi.nlm.nih.gov/books/NBK25497/ would be a good place to start. hopefully the SRA follows the same syntax standards as the rest of NCBI

ADD REPLY
0
Entering edit mode

This method doesn't seem to work anymore - the link provided only returns WebEnv parameter is required.

ADD REPLY
0
Entering edit mode

yes, seems not work anymore. There is a similar post at SO with a solution: http://stackoverflow.com/questions/15855188/extract-xml-from-xml-embebed-in-html

ADD REPLY
1
Entering edit mode
9.4 years ago
Tom Koch ▴ 110

http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?save=efetch&db=sra&rettype=fullxml&term=SRX001682[Experiment]

Sorry this is like 2 years too late but since someone might come across it in a search, here is the new way. I received this in an e-mail from Robert Sanders (NIH/NLM/NCBI) recently when e-mailing the sra-tools help address to get the full XML as actual XML. However the results are what you want, even though they're ugly, you will want to use

xmllint --format DOWNLOADEDFILENAME > srx001682.xml

(however you like) to get readable XML. I myself wanted SRR and it had to be termed SRR1169893[Accession], I'm not sure how important the bit in square brackets is however. It was suggested I try using E-utilities to programmatically retrieve the same information: http://www.ncbi.nlm.nih.gov/books/NBK25500/

ADD COMMENT

Login before adding your answer.

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