The Entrez Direct service is sometimes nonfunctional. We wrote a very simple replacement script that can fetch data in case efetch
does not work.
mkdir -p ~/bin
curl http://data.biostarhandbook.com/scripts/wonderfetch.sh > ~/bin/wonderfetch
chmod +x ~/bin/wonderfetch
wonderfetch database accession format
for example:
wonderfetch nucleotide AF086833 fasta
As it happens the internal implementation of fastq-dump
precludes it from working on Bash for Windows. Use a helper script that we have created to bypass this limitation. We call it the wonderdump
:
curl http://data.biostarhandbook.com/scripts/wonderdump.sh > ~/bin/wonderdump
chmod +x ~/bin/wonderdump
Then enjoy access to the SRA files where instead of writing:
fastq-dump -X 10000 --split-files $SRR
you'll need to write:
wonderdump SRR1972739 -X 10000 --split-files
There is a catch though! Note how the SRR number must be the first parameter instead of last!
To download batches of SRA ids put them into a file then run:
cat samples.txt | xargs -n 1 echo wonderdump | bash
A simple script to fetch information from the Gene Expression Omnibus
curl http://data.biostarhandbook.com/scripts/geodata.sh > ~/bin/geodata
chmod +x ~/bin/geodata
geodata GSE78711