If you’d like to use publicly available NGS data, you may want to learn how to use SRA toolkit. Downloaded .sra file can be converted to .fastq file.
Fyi… what is SRA?
http://www.ncbi.nlm.nih.gov/sra
http://www.ncbi.nlm.nih.gov/books/NBK158900/
Though above provides comprehensive information, my customer wanted to know ‘exactly how’ to use SRA toolkit, so I did it myself and summarized the workflow in below scripts (run at Mac Terminal) and the pdf file.
Hope this helps! and if you have any troubles please feel free to contact me! 🙂
#install sra toolkit
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
brew install wget
brew tap homebrew/science
brew install sratoolkit
#download individual sra file
wget ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByStudy/sra/SRP/SRP009/SRP009459/SRR384905/SRR384905.sra #change me#
#if you would like to download a series of sra files, do something like this
sra_list=({384905..384962})
base_url=ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByStudy/sra/SRP/SRP009/SRP009459
for sra_id in ${sra_list[@]}
do
wget ${base_url}/SRR${sra_id}/SRR${sra_id}.sra
sleep 10m
done
#convert sra to fastq
fastq-dump –split-files ./SRR384905.sra #change me#
#if you would like convert a series of sra files to fastq files, do something like this
sra_list=({384905..384962}) #change me#
for sra_id in ${sra_list[@]}
do
fastq-dump –split-files ./SRR${sra_id}.sra
done
#above is summarized in below pdf file
link to pdf file “SRA_toolkit”
Leave a Reply
You must be logged in to post a comment.