-
Notifications
You must be signed in to change notification settings - Fork 0
/
12_ldsc_munge.bsub
81 lines (68 loc) · 1.6 KB
/
12_ldsc_munge.bsub
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
#!/bin/bash
#BSUB -q long
#BSUB -J ldsc_munge[1-15]
#BSUB -n 4
#BSUB -R "span[ptile=4]"
#BSUB -R "rusage[mem=8GB]"
#BSUB -o /your/out/dir/ldsc_munge_%J_%I.out
#BSUB -e /your/err/dir/ldsc_munge_%J_%I.err
#This script creates ldsc_munge:sumstats output
#Load modules
module load anaconda3/2021.05
#set env
source /.bashrc
conda activate /./.conda/envs/ldsc
#phenotypes
pheno1=Cell_B
pheno2=Cell_P
pheno3=CLL
pheno4=DLBCL
pheno5=Drug_G1
pheno6=FL
pheno7=HL
pheno8=LM
pheno9=LPL_WM
pheno10=MGUS
pheno11=MM_MGUS
pheno12=MM
pheno13=MZL
pheno14=Soma_G1
pheno15=Soma_G2
#paths for sumstat files
path0=/your/dir/sumstats
path1=${path0}${pheno1}
path2=${path0}${pheno2}
path3=${path0}${pheno3}
path4=${path0}${pheno4}
path5=${path0}${pheno5}
path6=${path0}${pheno6}
path7=${path0}${pheno7}
path8=${path0}${pheno8}
path9=${path0}${pheno9}
path10=${path0}${pheno10}
path11=${path0}${pheno11}
path12=${path0}${pheno12}
path13=${path0}${pheno13}
path14=${path0}${pheno14}
path15=${path0}${pheno15}
# array job var
combined1=path${LSB_JOBINDEX}
combined2=pheno${LSB_JOBINDEX}
cd ${!combined1}
# example input: Cell_B_ldsc.ldsc.tsv.gz
# col.names: CHR POS A1 A2 Frq Beta Z P OR INFO N SNP
############### munge_sumstats ############################
python /./ldsc/munge_sumstats.py \
--sumstats ${!combined2}_ldsc.ldsc.tsv.gz \
--chunksize 500000 \
--merge-alleles /./ldsc/w_hm3.noMHC.snplist \
--maf-min 0.05 \
--frq Frq \
--snp SNP \
--N-col N \
--a1 A1 \
--a2 A2 \
--p P \
--signed-sumstats Z,0 \
--ignore "Beta,OR" \
--out ${!combined1}/${!combined2}_maf0p005_noMHC_munge.sumstats