-
Notifications
You must be signed in to change notification settings - Fork 20
/
_submit_trio_exclude.sh
executable file
·47 lines (35 loc) · 1.33 KB
/
_submit_trio_exclude.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
#!/usr/bin/env bash
if [[ "$#" -lt 3 ]]; then
echo "Usage: ./_submit_exclude.sh mat.meryl pat.meryl input.map [-10x]"
echo " mat.meryl: maternal kmers to exclude. Output will have prefix as pat."
echo " pat.meryl: paternal kmers to exclude. Output will have prefix as mat."
echo " input.map: reads to filter"
echo " format : R1.fq.gz <tab> R2.fq.gz"
echo " [-10x] : set if the reads are from 10x. optional."
exit -1
fi
LEN=`wc -l $3 | awk '{print $1}'`
cpus=24
mem=12g
name=filt
script=$MERQURY/trio/exclude_reads.sh
partition=norm
walltime=1-0
path=`pwd`
log=logs/$name.%A_%a.log
extra="--array=1-$LEN"
mkdir -p logs
db=$2
db=${db/.meryl/}
args="$1 $3 $db $4"
mkdir -p $db
echo "
sbatch -J $name --mem=$mem --partition=$partition --cpus-per-task=$cpus -D $path $extra --time=$walltime --error=$log --output=$log $script $args"
sbatch -J $name --mem=$mem --partition=$partition --cpus-per-task=$cpus -D $path $extra --time=$walltime --error=$log --output=$log $script $args
db=$1
db=${db/.meryl/}
args="$2 $3 $db $4"
mkdir -p $db
echo "
sbatch -J $name --mem=$mem --partition=$partition --cpus-per-task=$cpus -D $path $extra --time=$walltime --error=$log --output=$log $script $args"
sbatch -J $name --mem=$mem --partition=$partition --cpus-per-task=$cpus -D $path $extra --time=$walltime --error=$log --output=$log $script $args