-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.PWAS.SPrediXcan.sh
49 lines (38 loc) · 1.57 KB
/
2.PWAS.SPrediXcan.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
42
43
44
45
46
47
48
#!/bin/bash
############################################
##SET UP ENVIRONMENT
module load singularity
cohorts=("invnorm_max_lv_indexed" "invnorm_min_lv_indexed" "invnorm_lvef" "Khurshid_2023_v19_seg_lvmi_adjusted.bolt.imputed.filtered")
##CREATE VARIABLES FOR LOOP
# LSB_JOBINDEX starts with 1 so you will need to subtract one to get the array
# indexes to work correctly
IDX=$((LSB_JOBINDEX-1))
FILE_IDX=$((IDX))
tissues=('ARIC_EA_hg38' 'ARIC_AA_hg38')
METAXCAN=filepath/software
DATA=filepath/MVP_cardio
RESULTS=filepath/PWAS/output
GWAS=filepath/MVP_cardio
export METAXCAN=filepath/software
export DATA=filepath/MVP_cardio
export RESULTS=filepath/PWAS/output
export GWAS=filepath/MVP_cardio
printf "Run association\n\n"
module load python
#run TWAS
for tissue in "${tissues[@]}"; do singularity exec -B /project /project/ritchie/projects/CodeWorks_Projects/metaxcan.sif /opt/conda/bin/python /app/MetaXcan/software/SPrediXcan.py \
--model_db_path ~/group/personal/rasika/Cardio_WAS/PWAS/ARIC_Models/ARIC-selected/$tissue.db \
--covariance ~/group/personal/rasika/Cardio_WAS/PWAS/ARIC_Models/ARIC-selected/$tissue.txt.gz \
--model_db_snp_key varID \
--gwas_file $DATA/harmonized_gwas/MRI_${cohorts[$FILE_IDX]}.harmonized.txt.gz \
--snp_column panel_variant_id \
--chromosome_column chromosome \
--position_column position \
--effect_allele_column effect_allele \
--non_effect_allele_column non_effect_allele \
--beta_column effect_size \
--pvalue_column pvalue \
--keep_non_rsid \
--additional_output \
--throw \
--output_file $RESULTS/MRI_${cohorts[$FILE_IDX]}.$tissue.spredixcan.txt; done