Skip to content

Instantly share code, notes, and snippets.

@allenday
Last active March 27, 2017 22:00
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 allenday/d4fe9a97ba02d6aa5ff57b1c228e7f97 to your computer and use it in GitHub Desktop.
Save allenday/d4fe9a97ba02d6aa5ff57b1c228e7f97 to your computer and use it in GitHub Desktop.
for i in `wget -O - -q 'http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?save=efetch&rettype=runinfo&db=sra&term=PRJNA347566' | head | grep SRR | perl -ne 'chomp;@F=split/,/;$F[9]=~s#.+/##;print $F[9],"\n"'` ; do
echo $i ;
~/sratoolkit.2.8.1-2-ubuntu64/bin/fastq-dump --split-files -F $i ;
java -jar ~/bin/picard.jar FastqToSam F1=$i.fastq O=$i.bam SAMPLE_NAME=$i ;
gsutil cp $i.bam gs://$BUCKET_NAME/open-cannabis/samples/;
rm -v $i*;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment