-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGWAS_BMI_UKB_script.sh
39 lines (32 loc) · 1.7 KB
/
GWAS_BMI_UKB_script.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
#!/bin/bash
#$ -l h_rt=00:05:00
#$ -l h_vmem=10G
#$ -N GWAS_ukb
#$ -M [email protected]
#$ -m eas
#$ -e /hpc/hers_en/blin/UkBiobank/GWAS
#$ -o /hpc/hers_en/blin/UkBiobank/GWAS
rm GWAS_chr*_ukb.sh
for chr in {1..22}; do
echo "#!/bin/bash" > GWAS_chr${chr}_ukb.sh
echo "#$ -l h_rt=200:00:00 " >> GWAS_chr${chr}_ukb.sh
echo "#$ -l h_vmem=100G " >> GWAS_chr${chr}_ukb.sh
echo "#$ -N GWAS_ukb " >> GWAS_chr${chr}_ukb.sh
echo "#$ -M [email protected] " >> GWAS_chr${chr}_ukb.sh
echo "#$ -m eas " >> GWAS_chr${chr}_ukb.sh
echo "#$ -e /hpc/hers_en/blin/UkBiobank/GWAS " >> GWAS_chr${chr}_ukb.sh
echo "#$ -o /hpc/hers_en/blin/UkBiobank/GWAS " >> GWAS_chr${chr}_ukb.sh
echo "cd /hpc/hers_en/blin/UkBiobank/GWAS " >> GWAS_chr${chr}_ukb.sh
geno=/hpc/ukbiobank/genetic_v3/ukb_imp_chr${chr}_v3.bgen
sample=/hpc/hers_en/blin/UkBiobank/Pheno/Pheno_round2_SNPtest.sample
genotype=/hpc/ukbiobank/genetic_v3/ukb_imp_chr22_v3.bgen
pheno=/hpc/hers_en/blin/UkBiobank/Pheno/Pheno_round2_SNPtest.pheno
SNP=/hpc/hers_en/blin/UkBiobank/Post_GWAS/QC_INFO08_MAF_001_chr${chr}.txt
short=/hpc/hers_en/blin/UkBiobank/Pheno/Individual_height_33_quantile.txt
tall=/hpc/hers_en/blin/UkBiobank/Pheno/Individual_height_67_quantile.txt
echo " ./plink2 --bgen "${geno}" --pheno "${pheno}" --sample "${sample}" --extract "${SNP}" --pheno-name BMI --keep "${short}" --linear --threads 10 --out ukb_bmi_short_chr"${chr}".out " >> GWAS_chr${chr}_ukb.sh
echo " ./plink2 --bgen "${geno}" --pheno "${pheno}" --sample "${sample}" --extract "${SNP}" --pheno-name BMI --keep "${tall}" --linear --threads 10 --out ukb_bmi_tall_chr"${chr}".out " >> GWAS_chr${chr}_ukb.sh
done
for chr in {1..22}; do
qsub GWAS_chr${chr}_ukb.sh -pe threaded 10 -l h_vmem=100G
done