-
Notifications
You must be signed in to change notification settings - Fork 1
/
process.exhaustive.kmers.sbatch
70 lines (58 loc) · 1.37 KB
/
process.exhaustive.kmers.sbatch
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash -l
#SBATCH -J exhaustive
#SBATCH --time 120:00:00
#SBATCH -N 1
#SBATCH --exclude=brncl-[23-31]
#SBATCH --array 0-15
#SBATCH --output %x-%A_%a.out
#SBATCH --error %x-%A_%a.err
mamba activate bowtie2
set -x
set -e
set -o pipefail
if [[ -z ${FILES} ]]; then
echo "FILES not set"
exit 1
fi
if [[ -z ${EX_OUT} ]]; then
echo "FILES not set"
exit 1
fi
if [[ -z ${DB_BT2} ]]; then
echo "DB_BT2 not set"
exit 1
fi
if [[ ! -f ${FILES} ]]; then
echo "FILES not found"
exit 1
fi
mkdir -p ${EX_OUT}
bt2_threads=$((${SLURM_CPUS_PER_TASK} - 2))
python exhaustive.py process-kmers \
--kmer ${K} \
--jump ${J} \
--files ${FILES} \
--task-id ${SLURM_ARRAY_TASK_ID} \
--task-count ${SLURM_ARRAY_TASK_COUNT} \
--threads ${bt2_threads} \
--db-bt2 ${DB_BT2} \
--kmers-sam ${EX_OUT}/${SLURM_ARRAY_TASK_ID}.sam
# for f in $(cat ${FILES})
# do
# zcat ${f}
# done | \
# python kmer.py ${K} ${J} ${SLURM_ARRAY_TASK_ID} ${SLURM_ARRAY_TASK_COUNT} | \
# bowtie2 -p ${bt2_threads} \
# -x ${DB_BT2} \
# -f - \
# --seed 42 \
# --very-sensitive \
# -k 32 \
# --np 1 \
# --mp "1,1" \
# --rdg "0,1" \
# --rfg "0,1" \
# --score-min "L,0,-0.05" \
# --no-head \
# --no-unal | \
# xz -1 -z -c > ${EX_OUT}/${SLURM_ARRAY_TASK_ID}.sam.xz