-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrunCLUMPIFY_r1r2_array2.sbatch
executable file
·65 lines (54 loc) · 1.46 KB
/
runCLUMPIFY_r1r2_array2.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
#!/bin/bash -l
#SBATCH --job-name=clmp_r12
#SBATCH -o clmp_r1r2_-%A_%a.out
##SBATCH -p main
##SBATCH -c 40
#SBATCH --exclusive=user
enable_lmod
module load container_env pire_genome_assembly
#module load java/1.8
#module load bbmap/38.90
#module load parallel
export SINGULARITY_BIND=/home/e1garcia
#TEMPDIR=/scratch-lustre/cbird
#INDIR=/home/e1garcia/shotgun_PIRE/fq_4denovo_fp1
#OUTDIR=/home/e1garcia/shotgun_PIRE/fq_4denovo_fp1_clmp
FQPATTERN=${4}
TEMPDIR=${3}
INDIR=${1}
OUTDIR=${2}
THREADS=1 #clumpify uses a ton of ram, be conservative
GROUPS=auto #controls how much ram is used, refer to manual
#GROUPS=1
#RAMPERTHREAD=180g #have had to set as high as 233g with groups=1
#RAMPERTHREAD=233
RAMPERTHREAD=${5}
#ulimit -u 40960
ulimit -n 40960
#ulimit -s unlimited
ulimit -a
mkdir -p $OUTDIR
all_samples=$(ls $INDIR/$FQPATTERN | \
sed -e 's/r1\.fq\.gz//' -e 's/.*\///g')
all_samples=($all_samples)
sample_name=${all_samples[${SLURM_ARRAY_TASK_ID}]}
echo ${sample_name}
#systemctl status $PPID
#systemctl status $PPID | head -1 | awk '{print $2}' | xargs systemctl show -p TasksMax
#cat /proc/sys/kernel/threads-max
crun clumpify.sh \
in=$INDIR/${sample_name}r1.fq.gz \
in2=$INDIR/${sample_name}r2.fq.gz \
out=$OUTDIR/${sample_name}clmp.r1.fq.gz \
out2=$OUTDIR/${sample_name}clmp.r2.fq.gz \
groups=$GROUPS \
overwrite=t \
usetmpdir=t \
deletetemp=t \
tmpdir=$TEMPDIR \
dedupe=t \
addcount=t \
subs=2 \
containment=t \
consensus=f \
-Xmx$RAMPERTHREAD