4 # Downloads sequence and builds Bowtie index for for C. elegans
5 # versions WS200 from wormbase.
8 GENOMES_MIRROR=ftp://ftp.gramene.org/pub/wormbase/genomes/c_elegans/sequences/dna
10 BOWTIE_BUILD_EXE=./bowtie-build
11 if [ ! -x "$BOWTIE_BUILD_EXE" ] ; then
12 if ! which bowtie-build ; then
13 echo "Could not find bowtie-build in current directory or in PATH"
16 BOWTIE_BUILD_EXE=`which bowtie-build`
22 if ! wget --version >/dev/null 2>/dev/null ; then
23 if ! curl --version >/dev/null 2>/dev/null ; then
24 echo "Please install wget or curl somewhere in your PATH"
27 curl -o `basename $1` $1
35 F=c_elegans.WS200.dna.fa
37 FGZ=c_elegans.WS200.dna.fa.gz
38 wget ${GENOMES_MIRROR}/$FGZ || (echo "Error getting $F" && exit 1)
39 gunzip $FGZ || (echo "Error unzipping $F" && exit 1)
42 CMD="${BOWTIE_BUILD_EXE} $* $F c_elegans_ws200"
45 echo "c_elegans_ws200 index built; you may remove fasta files"
47 echo "Index building failed; see error message"