-
Notifications
You must be signed in to change notification settings - Fork 1
/
process.exhaustive.regions.sbatch
62 lines (48 loc) · 1.46 KB
/
process.exhaustive.regions.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
#!/bin/bash -l
#SBATCH -J contig_seqs
#SBATCH --time=100:00:00 # Walltime
#SBATCH --mem 120g
#SBATCH -c 64 # number of cores per task
#SBATCH -N 1 # number of nodes
#SBATCH --output %x-%A.out
#SBATCH --error %x-%A.err
mamba activate human-depletion
if [[ -z ${TMPDIR} ]]; then
echo "Must set TMPDIR"
exit 1
fi
set -x
set -e
set -o pipefail
export LC_ALL=C
python exhaustive.py process-regions \
--db-fna-staged ${DB_FNA_STAGED} \
--ex-out ${EX_OUT} \
--output ${EX_OUT}/exhaustive.fna
#-----------------------------
#Create bed path based on file input
# xzcat -T 7 ${EX_OUT}/*.sam.xz | \
# awk -F'\t' -v OFS='\t' '{sum = $4 + length($10); print $3, $4, sum, $1, $10}' | \
# xz -1 -z -c -T 8 > ${EX_OUT}/awk.aggregated.xz
# xzcat -T 4 ${EX_OUT}/awk.aggregated.xz | \
# sort \
# --parallel 8 \
# --buffer-size=100g \
# -k1,1 \
# -k2,2n | \
# python deduplicate.py | \
# xz -1 -z -c -T 4 > ${EX_OUT}/awk.aggregated.sorted.xz
# xzcat -T 15 ${EX_OUT}/awk.aggregated.sorted.xz | \
# bedtools merge \
# -i stdin \
# -c 5 \
# -o count > ${EX_OUT}/exhaustive.bed
# OUTPUT=${EX_OUT}/exhaustive.fna
# python trim-to-max-length.py \
# ${DB_FNA_STAGED} \
# ${EX_OUT}/exhaustive.bed \
# ${EX_OUT}/exhaustive.trimmed.bed
# bedtools getfasta \
# -fi ${DB_FNA_STAGED} \
# -bed ${EX_OUT}/exhaustive.trimmed.bed \
# -fo ${OUTPUT}