Last active
November 29, 2021 18:01
-
-
Save mooreryan/b17888a1318ff5aad14667c7f6f9937d to your computer and use it in GitHub Desktop.
Download reads from the SRA
This file contains 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
#!/bin/bash | |
if [[ $# -ne 3 ]]; then | |
>&2 echo "usage: download_sra_reads <acc_list.txt> <outdir> <num_threads>" | |
exit 1 | |
fi | |
NUM_THREADS="${3}" | |
OUTDIR="${2}" | |
ACC_LIST="${1}" | |
parallel --jobs ${NUM_THREADS} --retries 3 \ | |
fastq-dump \ | |
--defline-seq "'@\$ac \$sn/\$ri'" \ | |
--defline-qual "'+\$ac \$sn/\$ri'" \ | |
--split-e \ | |
--disable-multithreading \ | |
--outdir ${OUTDIR} \ | |
{} \ | |
<${ACC_LIST} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment