Forked from suimye/gist:d8edec74cce9ecad86cd
Created
December 1, 2018 05:52
Star
You must be signed in to star a gist
For retrieving fastq file from NCBI GEO using GSM number.
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/sh | |
if ! type "efetch" > /dev/null; then | |
print "Please install E-utilitie." | |
fi | |
GSM_LIST=$1 | |
GSMs=`cat $GSM_LIST|cut -f1` | |
#echo $SRRs | |
! type "foo" > /dev/null 2>&1; | |
for GSM in $GSMs; do | |
echo $GSM retrieves from NCBI GEO..... | |
SRR=`esearch -db sra -query $GSM |efetch -format docsum |xtract -pattern DocumentSummary -element Run@acc` | |
echo downloading $SRR | |
fastq-dump -A $SRR -O sra_fastq | |
echo fastq-dump done..... | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment