Last active
June 21, 2019 07:26
-
-
Save danielecook/1fe7c42ded1e05fabe35 to your computer and use it in GitHub Desktop.
Download data from the sequence read archive and convert to fastq format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download_SRP_Runs() { | |
SRP_IDs=`esearch -db sra -query $1 | efetch -format docsum | xtract -pattern DocumentSummary -element Run@acc | tr '\t' '\n'` | |
for r in ${SRP_IDs}; do | |
url="ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/${r:0:6}/${r}/${r}.sra" | |
wget $url | |
done; | |
} | |
Download_SRP_Runs <SRP ID GOES HERE> | |
# Convert to fastq | |
parallel fastq-dump --split-files --gzip {} ::: *.sra | |
# Perform quality control | |
parallel fastqc {} ::: *.fastq.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just seeing this but thank you very much!