File: get-minikrakendb

package info (click to toggle)
qcumber 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 2,276 kB
  • sloc: python: 3,097; sh: 153; makefile: 18
file content (38 lines) | stat: -rwxr-xr-x 1,322 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

conffile=/etc/qcumber/config.txt
krakendb=`sed '/\[PATH\]/,$d' $conffile | grep "^kraken_db" | head -n 1 | sed 's/^kraken_db *= *\([^ ]\+\) *$/\1/'`
KRAKENDBDIR="echo krakendb | sed 's?/minikraken_20141208/*$//'"

check_krakendb_md5 () {
  if ! grep -q "$1.*$2" minikraken.md5 ; then
    echo "$2 has changed md5sum - please investigate"
  fi
}

if [ ! -d $KRAKENDBDIR ] ; then
cat <<EOT
Please care for the installation of $KRAKENDBDIR and make sure you have
sufficient permission to write to this directory.
EOT
    exit 1
fi

cd $KRAKENDBDIR

if ! touch testfile 2>/dev/null ; then
     echo "You do not have permission to write to $KRAKENDBDIR."
     exit 1
fi
rm testfile

wget https://ccb.jhu.edu/software/kraken/dl/minikraken.tgz
tar xaf minikraken.tgz
md5sum `find . -type f` > minikraken.md5

check_krakendb_md5 30eab12118158d0b31718106785195e2 minikraken.tgz
check_krakendb_md5 362490d24caaa619102c27fa11caebe2 minikraken_20141208/MiniKraken.README
check_krakendb_md5 2e2253a440d18baaaac8b3ef400d3393 minikraken_20141208/database.kdb
check_krakendb_md5 68e3c1c8502fd7bc84649a96666c844f minikraken_20141208/taxonomy/nodes.dmp
check_krakendb_md5 ee5f25d7aa0a259be9ac82074f07e443 minikraken_20141208/taxonomy/names.dmp
check_krakendb_md5 f4a97df0e8a55451af9d5bd94ca7186e minikraken_20141208/database.idx