Hi!!
As I comment before, in the sra-explorer
webpage, at the bottom, are mentioned three tools; nf-core/fetchngs, pysradb, fetchfastq.
I discarded the first one by the comments of GenoMax and jared.andrews07 and tried the other two.
With pysradb
I couldn't make it work. Any SRRxxx that I gave to him gave me in return a "not found in database" and the same with its function gsm-to-srr
, which raised the same error (when you try to run it for the first time it download a database to use with their commands to fetch the metadata or download).
And I think the third one is more promising, fetchfastq
was able to find any accession with which I feed the tool and in return, it gives you a json file with all the metadata for that accession, parsing SRR and GSM (and others,...).
In these json files appear all the metadata, including the type and the different URL to download (fetchfastq
has in the user guide a description of how to use it to retrieve only the URL and pipe it to curl
, although I didn't try it yet).
From here I guess It should be feasible to loop and get all the URL's to download the files as they are, plus, there is room to parse the json file to make a huge metadata-base to have all information regarding the files for downstream analysis/uses/etc. But I am not as good with scripting to manage such kind of task :=)
The direct link to this tool: https://github.com/pachterlab/ffq
Any further thoughts? XD
Thanks!
Another solution is to use
sra-explorer
(https://sra-explorer.info/ ) and get direct links for fastq files as a bash script or aspera download links. For that many accessions it would be best to stay away fromsratoolkit
.Thank you GenoMax , I try to use 'sra-explorer' but it works perfectly fine with individual accessions (GSMxxx or SRRxxxx) but I can not make it work given to it multiple accessions. The query changes automatically to 'SRRxxx[All Fields] AND SRRxxx[All Fields]' and it tries to load some results but stops and shows nothing. Not sure how it can work with more than one query.
The good thing is it offers you some alternative tools at the bottom of the webpage.