-
Notifications
You must be signed in to change notification settings - Fork 1
/
kraken2.sh
executable file
·50 lines (36 loc) · 976 Bytes
/
kraken2.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash -l
#SBATCH --time=8:00:01
#SBATCH --mem=38g
#SBATCH --tmp=48g
# --------------------------------------------------------------------------- #
ACCESSION=$1
THREADS=$2
DIR_OUT=$3
KRAKEN_DB=$4
FASTQ9=$5
FASTQ10=$6
KRAKEN_REPORT=$7
CONFIG=$8
# --------------------------------------------------------------------------- #
# Check if $DIR_OUT exists:
if [[ ! -e $DIR_OUT ]]; then
echo "ERROR: $DIR_OUT not found! Exiting."; exit
fi
# Check if $FASTQ9 exists:
if [[ ! -e $FASTQ9 ]]; then
echo "ERROR: $FASTQ9 not found! Exiting."; exit
fi
# Check if $FASTQ10 exists:
if [[ ! -e $FASTQ10 ]]; then
echo "ERROR: $FASTQ10 not found! Exiting."; exit
fi
# --------------------------------------------------------------------------- #
time staphb-tk \
--docker_config $CONFIG \
kraken2 \
--db $KRAKEN_DB \
--threads $THREADS \
--output $DIR_OUT/$ACCESSION.kraken \
--use-names \
--report $KRAKEN_REPORT \
--paired $FASTQ9 $FASTQ10