Skip to content

Instantly share code, notes, and snippets.

@mlovci
Last active August 29, 2015 14:06
Show Gist options
  • Save mlovci/2adc03cc50c4cf3220fe to your computer and use it in GitHub Desktop.
Save mlovci/2adc03cc50c4cf3220fe to your computer and use it in GitHub Desktop.
download_sra.sh
#!/bin/bash
SRA=$1
mkdir dl_$SRA
cd dl_$SRA
echo downloading $SRA
DL_CMD="bionode-ncbi download sra $SRA"
echo $DL_CMD
eval $DL_CMD
find . | grep -P '.sra$'>sra_list
cat sra_list | xargs -P 8 -n 1 bionode-sra fastq-dump
find *.fastq > fastq_list.txt
echo completed download of $SRA in dl_$SRA and dumped these files $(cat fastq_list.txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment