4 # Downloads sequence for A. thaliana from TAIR. This script was used
5 # to build the Bowtie index for A. thaliana. The downloaded version
9 GENOMES_MIRROR=ftp://ftp.arabidopsis.org/home/tair
13 if ! wget --version >/dev/null 2>/dev/null ; then
14 if ! curl --version >/dev/null 2>/dev/null ; then
15 echo "Please install wget or curl somewhere in your PATH"
18 curl -o `basename $1` $1
26 BOWTIE_BUILD_EXE=./bowtie-build
27 if [ ! -x "$BOWTIE_BUILD_EXE" ] ; then
28 if ! which bowtie-build ; then
29 echo "Could not find bowtie-build in current directory or in PATH"
32 BOWTIE_BUILD_EXE=`which bowtie-build`
36 for c in 1 2 3 4 5 C M ; do
37 if [ ! -f chr$c.fas ] ; then
38 F=${GENOMES_MIRROR}/Sequences/whole_chromosomes/chr$c.fas
39 get $F || (echo "Error getting $F" && exit 1)
42 if [ ! -f chr$c.fas ] ; then
43 echo "Could not find chr$c.fas file!"
48 CMD="${BOWTIE_BUILD_EXE} $* chr1.fas,chr2.fas,chr3.fas,chr4.fas,chr5.fas,chrC.fas,chrM.fas a_thaliana"
51 echo "a_thaliana index built; you may remove fasta files"
53 echo "Index building failed; see error message"