-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhap.sh
More file actions
executable file
·50 lines (31 loc) · 786 Bytes
/
hap.sh
File metadata and controls
executable file
·50 lines (31 loc) · 786 Bytes
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
#!/bin/bash
#$ -N hap
#$ -t 1-66
#$ -S /bin/bash
#$ -cwd
#$ -o job_reports/
#$ -e job_reports/
#$ -l h_vmem=10G
# This script will take a reference-aligned binary plink file and:
# 1. For each chromosome perform hapi-ur haplotyping 3 times
nrep="3"
nchr="22"
if [ -n "${1}" ]; then
SGE_TASK_ID=${1}
fi
SGE_TASK_ID=`expr ${SGE_TASK_ID} - 1`
chr=`expr ${SGE_TASK_ID} % ${nchr} + 1`
rep=`expr ${SGE_TASK_ID} % ${nrep} + 1`
set -e
echo "chr = ${chr}"
echo "rep = ${rep}"
wd=`pwd`"/"
source parameters.sh
cd ${targetdatadir}
wsize=`echo "36.62 + ${nsnp} * 0.00007" | bc -l | xargs printf "%1.0f"`
echo "window size = ${wsize}"
if [ ${wsize} -lt 64 ]; then
wsize=64
fi
hapout="${hapdatadir}${chrdata}_${rep}"
${hapi_ur} -p ${chrdata} -o ${hapout} -w ${wsize} --impute2