-
Notifications
You must be signed in to change notification settings - Fork 0
/
diel.SAMPLE.slurm
95 lines (79 loc) · 2.48 KB
/
diel.SAMPLE.slurm
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
#SBATCH -p LM
#SBATCH -N 1
#SBATCH -C "LM&PH2"
#SBATCH --mem=3000GB
#SBATCH -t 6-00:00:00
#SBATCH [email protected]
#SBATCH --mail-type=end
#set up environment
module load gcc/5.3.0
module load perl/5.18.4-threads
module load java/jdk8u73
module load samtools/1.3
module load bowtie2/2.2.7
module load trinity/2.4.0
# check where we're running
/bin/hostname
set -x
ulimit -s unlimited
ulimit -c unlimited
ulimit -a
SCR=$LOCAL
# labels to keep track of jobs
jobid=$SLURM_JOBID
arrayid=$SLURM_ARRAY_JOB_ID
arraytask=$SLURM_ARRAY_TASK_ID
node=`/bin/hostname`
dataset=GF
fs=local
version=2.3.2_icc-16.03_gcc-5.3
name=trinity.$dataset.$node.$fs.$version.$jobid.${arrayid}_${arraytask}
# settings to tweak for performance
# setting nthreads_bfly to 64 causes errors in trinity 2.0.6
ncores=80
nthreads=80
maxmem=2800G
nthreads_bfly=20
bflymaxheap=32G
bflyinitheap=1G
nthreads_gc=2
# where you want Trinity output to go
submitdir=$SLURM_SUBMIT_DIR
# input files
# input=All.fq
left_reads="${SAMPLE}.all.left.fastq.gz"
right_reads="${SAMPLE}.all.right.fastq.gz"
# set this to the directory Trinity will run in
rundir_dest=/pylon2/oc4s88p/groussma/diel1_assembly
mkdir -p $rundir_dest
# if not using local disk, set rundir=$rundir_dest
rundir=$SCR/$name
mkdir -p $rundir
#rundir=$rundir_dest
# set this to wherever input data is located
# this can be same or different from rundir
datadir_src=/pylon5/oc4s88p/groussma/diel1_reads/
# if not copying initial inputs to local disk, set datadir=$datadir_src
datadir=$SCR
#datadir=$datadir_src
#cd $datadir_src
#cp -p $input $datadir
# run Trinity
##########################################
cd $rundir
# time cp $datadir_src/$input $rundir
time cp $datadir_src/$left_reads $rundir
time cp $datadir_src/$right_reads $rundir
time srun Trinity --seqType fq --max_memory $maxmem \
--left $left_reads --right $right_reads --min_contig_length 300 --CPU $nthreads \
--min_kmer_cov 2 --normalize_reads --SS_lib_type RF \
--bflyCPU $nthreads_bfly --bflyGCThreads $nthreads_gc --bflyHeapSpaceMax $bflymaxheap --bflyHeapSpaceInit $bflyinitheap \
--output $rundir/trinity_out_dir >& $submitdir/$name.ncor_${ncores}.nthr_${nthreads}.maxmem_${maxmem}.bflythr_${nthreads_bfly}.bflygc_${nthreads_gc}.bflymh_${bflymaxheap}_bflyih_${bflyinitheap}.out
if [[ $rundir == $SCR/$name ]]; then
mkdir -p $rundir_dest/$jobid
time cp -p $SCR/$name/trinity_out_dir/Trinity* $rundir_dest/$jobid
# cd ..
# time tar czf $name.tgz $name
# time cp -p $name.tgz $rundir_dest/$jobid
fi