getRefDB.sh 1.06 KB
Newer Older
Paul Costea's avatar
Paul Costea committed
1 2 3 4 5 6
#!/bin/bash

download_9() {
    [ -d "db" ] || mkdir -p db
    cd db
    echo "Downloading the archive."
Robin Erich Muench's avatar
Robin Erich Muench committed
7
    wget vm-lux.embl.de/~rmuench/files/freeze9.tar.bz2
Paul Costea's avatar
Paul Costea committed
8 9 10
    echo "This might take up to 10 minutes."
    echo "Extracting files!"
    echo "Patience please..."
Robin Erich Muench's avatar
Robin Erich Muench committed
11 12
    tar xjvf freeze9.tar.bz2
    rm freeze9.tar.bz2
Paul Costea's avatar
Paul Costea committed
13 14 15 16 17 18 19
    exit	
}

download_11() {
    [ -d "db" ] || mkdir -p db
    cd db
    echo "Downloading the archive."
Robin Erich Muench's avatar
Robin Erich Muench committed
20
    wget vm-lux.embl.de/~rmuench/files/freeze11.tar.bz2
Paul Costea's avatar
Paul Costea committed
21 22 23
	echo "This might take up to 20 minutes."
    echo "Extracting files!"
    echo "Patience please..."
Robin Erich Muench's avatar
Robin Erich Muench committed
24 25
    tar xjvf freeze11.tar.bz2
    rm freeze11.tar.bz2
Paul Costea's avatar
Paul Costea committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    exit
}


echo "You are about to download the metaSNP database"
echo ""
echo "Requirements:"
echo "  - Freeze9:  12G available disc space (1753 genomes)"
echo "  - Freeze11: 33G available disc space (5278 genomes)"
echo ""
echo "Please make a selection by entering the right number:"

select yn in "f9" "f11" "cancel"; do
    case $yn in
        f9 ) download_9 ; break;;
        f11 ) download_11; break;;
        cancel ) exit;;
    esac
done