-
Notifications
You must be signed in to change notification settings - Fork 5
/
sw34.sh
41 lines (36 loc) · 1.04 KB
/
sw34.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
#!/usr/bin/bash
function plink19()
{
export module=plink2/1.90beta5.4
export c=plink
export d=import-dosage
export p=fam
export m=map
}
function plink20()
{
export module=plink2/2.00alpha20181028
export c=plink2
export d=import-dosage
export p=psam
export m=map
}
plink20
module load $module
export rt=/data/andmala/STANLEY
ls $rt/ | \
grep .gz | \
grep -v test | \
sed 's/dos_bip_sw34_eur_rk-qc.hg19.ch.fl.chr//g;s/.out.dosage.fam//g;s/.out.dosage.gz//g;s/.out.dosage.map//g' > sw34.list
cat sw34.list | \
parallel -j5 --env rt --env c --env d --env p --env m -C' ' '
$c --${d} $rt/dos_bip_sw34_eur_rk-qc.hg19.ch.fl.chr{}.out.dosage.gz \
--${p} $rt/dos_bip_sw34_eur_rk-qc.hg19.ch.fl.chr{}.out.dosage.fam \
--${m} $rt/dos_bip_sw34_eur_rk-qc.hg19.ch.fl.chr{}.out.dosage.map \
--export bgen-1.1 --out {}
'
module unload $module
module load bgen/20180807
cat-bgen -g $(awk '{$1=$1 ".bgen";printf $1 " "}' sw34.list) -og sw34.bgen
module load gcc/5.4.0 lapack/3.8.0 qctool/2.0.1
qctool -g sw34.bgen -snp-stats -osnp sw34.snp-stats