Tool:Script: Downloading fastq files from ENA database
0
0
Entering edit mode
3.2 years ago

Script for downloading fastq files from ENA database: Gist github link

Create a file named "SRRs_to_process.txt" in the same directory as the script file and this file should have a list of single SRR ID as entries in every line.

Fastq files will be downloaded in the same directory where the script is located. Script also generates an output file named "Number_of_reads_in_fastq_files.txt" which has information on the status of download of the fastq files and number of reads in the fastq file downloaded.

Note: This script was tested in both Mac OS and linux OS and it requires "curl".

If you have SRX ID and want to map SRX IDs to SRR IDs, please refer: biostar link

next-gen-sequencing RNA-Seq • 1.5k views
ADD COMMENT
0
Entering edit mode

Hey, thanks for contributing. I would suggest though to add some documentation and confirm it works properly on Mac and Linux.

On Mac:

./foo.sh SRR5454413
./foo.sh: line 18: syntax error near unexpected token `&'
./foo.sh: line 18: `    then echo "Temp file download successful" |& tee -a Number_of_reads_in_fastq_files.txt'

./foo.sh < SRRs_to_process.txt 
./foo.sh: line 18: syntax error near unexpected token `&'
./foo.sh: line 18: `    then echo "Temp file download successful" |& tee -a Number_of_reads_in_fastq_files.txt'

./foo.sh SRRs_to_process.txt 
./foo.sh: line 18: syntax error near unexpected token `&'
./foo.sh: line 18: `    then echo "Temp file download successful" |& tee -a Number_of_reads_in_fastq_files.txt'

No idea how to use it. Please add documentation. I personally find it helpful if running the plain script without arguments returns a help page explaining the how-to's.

ADD REPLY
0
Entering edit mode

Just create the file "SRRs_to_process.txt" in the same directory as the script. The script will automatically read in the file.

ADD REPLY
0
Entering edit mode

I still get the above error.

ADD REPLY
0
Entering edit mode

Thanks for the input.

ADD REPLY
0
Entering edit mode

what's your version of bash ?

ADD REPLY
0
Entering edit mode

That'd explain things. I am on

$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Software Foundation, Inc.

What do you use jayeshkumarsundaram ?

ADD REPLY

Login before adding your answer.

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