crossconta-detection 545 Bytes
Newer Older
khalid's avatar
khalid committed
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
#!/bin/bash

SCRIPT_PATH=$(readlink -f "$0")
export PATH=$PATH:`dirname $SCRIPT_PATH`

# echo something in stderr
function errcho(){
    >&2 echo $1
}

# check if a binary can be found in the PATH
# if not, warn and die
function checkBinPresence(){
    if [[ "`which $1`" == "" ]]; then
        errcho "$1 must be installed and in your PATH"
        exit 1
    fi
}

# checking bowtie presence
checkBinPresence bowtie
checkBinPresence bowtie-build

# now we launch the script and pass it all the arguments we received
crossconta-detection.pl $@