4 # Downloads assembled sequence for M. musculus (mouse) from NCBI.
6 # From README_CURRENT_BUILD:
7 # Organism: Mus musculus (mouse)
8 # NCBI Build Number: 37
10 # Release date: 05 July 2007
13 M_MUS_FTP=ftp://ftp.ncbi.nih.gov/genomes/M_musculus/Assembled_chromosomes
14 M_MUS_MT_FTP=ftp://ftp.ncbi.nih.gov/genomes/M_musculus/CHR_MT
15 OUTPUT=m_musculus_ncbi37
19 if ! wget --version >/dev/null 2>/dev/null ; then
20 if ! curl --version >/dev/null 2>/dev/null ; then
21 echo "Please install wget or curl somewhere in your PATH"
24 curl -o `basename $1` $1
32 BOWTIE_BUILD_EXE=./bowtie-build
33 if [ ! -x "$BOWTIE_BUILD_EXE" ] ; then
34 if ! which bowtie-build ; then
35 echo "Could not find bowtie-build in current directory or in PATH"
38 BOWTIE_BUILD_EXE=`which bowtie-build`
44 [ -n "$INPUTS" ] && INPUTS=$INPUTS,$1
45 [ -z "$INPUTS" ] && INPUTS=$1
48 for c in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 X Y ; do
50 if [ ! -f mm_ref_chr$c.fa ] ; then
52 get $M_MUS_FTP/$FGZ || (echo "Error getting $FGZ" && exit 1)
53 gunzip $FGZ || (echo "Error unzipping $FGZ" && exit 1)
59 if [ ! -f mm_ref_chrMT.fa ] ; then
61 get $M_MUS_MT_FTP/$FGZ || (echo "Error getting $FGZ" && exit 1)
62 gunzip $FGZ || (echo "Error unzipping $FGZ" && exit 1)
66 CMD="$BOWTIE_BUILD_EXE $* $INPUTS $OUTPUT"
69 echo "$OUTPUT index built; you may remove fasta files"
71 echo "Index building failed; see error message"