4 # Downloads sequence for the canFam2 version of C. familiaris (dog)
10 while [ $i -lt 39 ] ; do
11 BASE_CHRS="$BASE_CHRS chr$i"
14 BASE_CHRS="$BASE_CHRS chrX chrM chrUn"
15 CHRS_TO_INDEX=$BASE_CHRS
17 CANFAM2_BASE=ftp://hgdownload.cse.ucsc.edu/goldenPath/canFam2/chromosomes
21 if ! wget --version >/dev/null 2>/dev/null ; then
22 if ! curl --version >/dev/null 2>/dev/null ; then
23 echo "Please install wget or curl somewhere in your PATH"
26 curl -o `basename $1` $1
34 BOWTIE_BUILD_EXE=./bowtie-build
35 if [ ! -x "$BOWTIE_BUILD_EXE" ] ; then
36 if ! which bowtie-build ; then
37 echo "Could not find bowtie-build in current directory or in PATH"
40 BOWTIE_BUILD_EXE=`which bowtie-build`
45 for c in $CHRS_TO_INDEX ; do
46 if [ ! -f ${c}.fa ] ; then
48 get ${CANFAM2_BASE}/$F || (echo "Error getting $F" && exit 1)
49 gunzip $F || (echo "Error unzipping $F" && exit 1)
51 [ -n "$INPUTS" ] && INPUTS=$INPUTS,${c}.fa
52 [ -z "$INPUTS" ] && INPUTS=${c}.fa
55 CMD="${BOWTIE_BUILD_EXE} $* ${INPUTS} canFam2"
58 echo "canFam2 index built; you may remove fasta files"
60 echo "Index building failed; see error message"