Tool: Script: Downloading fastq files from ENA database
0
gravatar for jayeshkumarsundaram
6 weeks ago by
jayeshkumarsundaram0 wrote:

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

ADD COMMENTlink modified 6 weeks ago • written 6 weeks ago by jayeshkumarsundaram0

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 REPLYlink modified 6 weeks ago • written 6 weeks ago by ATpoint46k

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

ADD REPLYlink written 6 weeks ago by jayeshkumarsundaram0

I still get the above error.

ADD REPLYlink written 6 weeks ago by ATpoint46k

Thanks for the input.

ADD REPLYlink written 6 weeks ago by jayeshkumarsundaram0

what's your version of bash ?

ADD REPLYlink written 6 weeks ago by Pierre Lindenbaum134k

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 REPLYlink written 6 weeks ago by ATpoint46k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1300 users visited in the last hour
_