Skip to content

Instantly share code, notes, and snippets.

@yangwu91
Created July 13, 2018 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangwu91/ac84d9440b1ef33a5923dabc5a766446 to your computer and use it in GitHub Desktop.
Save yangwu91/ac84d9440b1ef33a5923dabc5a766446 to your computer and use it in GitHub Desktop.
Download data from the SRA database, compatible with downstream Trinity assembly.
#!/bin/bash
if [ -f $1 ]; then
for SRA in `grep -o "SRR[0-9]\{7\}" $1`; do
echo $SRA
fastq-dump --defline-seq '@$sn[_$rn]/$ri' --split-files $SRA &
done
else
fastq-dump --defline-seq '@$sn[_$rn]/$ri' --split-files $1
fi
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment