-
Notifications
You must be signed in to change notification settings - Fork 21
/
_submit_hapmers.sh
executable file
·41 lines (35 loc) · 1.32 KB
/
_submit_hapmers.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
#!/usr/bin/env bash
if [[ "$#" -lt 2 ]]; then
echo "Usage: ./_submit_hapmers.sh <mat.meryl> <pat.meryl> [child.meryl]"
echo -e "\t<mat.meryl>:\tmeryl db of the maternal read set"
echo -e "\t<pat.meryl>:\tmeryl db of the paternal read set"
echo -e "\t[child.meryl]:\tmeryl db of the child read set"
echo
echo -e "\t\t\tThe parental hap-mers will be linked as"
echo -e "\t\t\t - mat_only.meryl"
echo -e "\t\t\t - pat_only.meryl"
echo
echo -e "\t\t\tWhen child.meryl is provided, inherited hap-mers will be linked as"
echo -e "\t\t\t - mat.inherited.meryl"
echo -e "\t\t\t - pat.inherited.meryl"
echo
echo -e "\t\t\tUse the followings for evaluating trios"
echo -e "\t\t\t - mat.hapmer.meryl"
echo -e "\t\t\t - pat.hapmer.meryl"
exit -1
fi
mat_meryl=$1
pat_meryl=$2
child_meryl=$3
mkdir -p logs
cpus=16 # Max: 64 per each .meryl/ file writer
mem=24g
partition=quick
walltime=3:00:00
name=hapmers
script=$MERQURY/trio/hapmers.sh
args="$mat_meryl $pat_meryl $child_meryl"
log=logs/$name.%A.log
echo "\
sbatch -J $name --mem=$mem --partition=$partition --cpus-per-task=$cpus -D `pwd` --time=$walltime --error=$log --output=$log $script $args"
sbatch -J $name --mem=$mem --partition=$partition --cpus-per-task=$cpus -D `pwd` --time=$walltime --error=$log --output=$log $script $args