This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Url To Download Sra Experiment_Package Xml File Programmatically

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

2 answers

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

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

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/

Log in to answer this question.