forked from joyceyiyiwang/Portability_Questions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
09f_gwas_close.sh
39 lines (35 loc) · 1.24 KB
/
09f_gwas_close.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
#!/bin/bash
#SBATCH -J GWAS_close
#SBATCH -o GWAS_close.o%j
#SBATCH -e GWAS_close.o%j
#SBATCH -p normal
#SBATCH -N 1
#SBATCH -n 4
#SBATCH -t 16:00:00
#SBATCH -A OTH21148
#SBATCH [email protected]
#SBATCH --mail-type=begin
#SBATCH --mail-type=end
set -e
plink='/work2/06568/joyce_w/stampede2/software/plink/plink/plink'
plink2='/work2/06568/joyce_w/stampede2/software/plink/plink2/plink2'
# Directory
scratch='/scratch/06568/joyce_w/pgs_portability_questions/data'
# Only run GWAS on the SNPs significant at 1e-5 in the original GWAS
for phenotype in BMI Lymphocyte Height Eosinophil MCH MCV Monocyte Platelet RBC WBC LDL Weight Triglycerides Cystatin_C Body_Fat_Perc
do
$plink2 \
--bfile ${scratch}/ukb_merged/ukb_merged \
--keep data/ukb_populations/close_id.txt \
--extract data/pgs/${phenotype}_threshold_1.txt \
--pheno data/phenotypes/phenotypes.tsv \
--pheno-name $phenotype \
--require-pheno $phenotype \
--covar data/ukb_merged/covar_close.tsv \
--covar-name age sex_covar age_sq age_sex age_sq_sex $(printf "PC%i " $(seq 1 20)) \
--vif 100000 \
--memory 35000 \
--glm hide-covar \
--covar-variance-standardize \
--out data/gwas_results/${phenotype}_close
done