which, conveniently enough, have their IDs in a range
I think it's a bit risky to rely on that - for this particular case they are not going to change but you may need to download more samples in the future.
I would suggest avoiding sra
and fastq(er)-dump
altogether and use ena instead.
In your case, it seems you want the runs in project PRJDB7736. From here https://www.ebi.ac.uk/ena/browser/view/PRJDB7736 you can get a tabular file (see link in Download report ... TSV) with the sample characteristics. Column fastq_ftp
gives you the ftp link to the fastq files that you can pass to wget
or curl
.
You can also get the same report programmatically with:
curl -s -X GET "https://www.ebi.ac.uk/ena/portal/api/filereport?accession=PRJDB7736&fields=run_accession,sample_description,library_name,library_layout,fastq_ftp&result=read_run" > ena.tsv
You should edit the fields=...
list to suite your needs. The fields available are those from:
curl -X GET "https://www.ebi.ac.uk/ena/portal/api/returnFields?dataPortal=ena&result=read_run"
I don't know what you think... I find this route much more useful and transparent than sra's.