• Transcriptome-wide association methods
    • predict expression
    • run association between predicted expression and phenotype
  • Summary PrediXcan
    • download harmonized and imputed GWAS result for coronary artery disease
    • run s-predixcan
    • plot and interpret s-predixcan results
    • run multixcan (optional)
  • Colocalization methods
    • fine-map GWAS results
    • estimate priors
    • calculate colocalization with fastENLOC
    • analyze results compare with s-predixcan results

Last updated: 2020-06-03

Checks: 6 1

Knit directory: QGT-Columbia-HKI/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20200603) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version fb3ff44. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  analysis/predixcan_analysis.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


Transcriptome-wide association methods

predict expression


export DATA=$PRE/s-predixcan/data
export MODEL=$PRE/models
export METAXCAN=$PRE/MetaXcan-master/software
export OUTPUT=$PRE/results

<!-- export METAXCAN=/Users/haekyungim/Desktop/local-analysis/QGT-Columbia-HKI/MetaXcan-master/software -->
<!-- export DATA=/Users/haekyungim/Desktop/local-analysis/QGT-Columbia-HKI/predixcan/data -->
<!-- export RESULTS=/Users/haekyungim/Desktop/local-analysis/QGT-Columbia-HKI/predixcan/results -->
<!-- mkdir $RESULTS -->

printf "Predict expression\n\n"
python3 $METAXCAN/Predict.py \
--model_db_path $DATA/models/gtex_v8_en/en_Whole_Blood.db \
--vcf_genotypes $DATA/1000G_hg38/ALL.chr22.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz \
--vcf_mode genotyped \
--variant_mapping $DATA/gtex_v8_eur_filtered_maf0.01_monoallelic_variants.txt.gz id rsid \
--on_the_fly_mapping METADATA "chr{}_{}_{}_{}_b38" \
--prediction_output $RESULTS/vcf_1000G_hg38_en/Whole_Blood__predict.txt \
--prediction_summary_output $RESULTS/vcf_1000G_hg38_en/Whole_Blood__summary.txt \
--verbosity 9 \
--throw

printf "association\n\n"
python3 $METAXCAN/PrediXcanAssociation.py \
--expression_file $RESULTS/vcf_1000G_hg38_en/Whole_Blood__predict.txt \
--input_phenos_file $DATA/1000G_hg38/random_pheno_1000G_hg38.txt \
--input_phenos_column pheno \
--output $RESULTS/vcf_1000G_hg38_en/Whole_Blood__association.txt \
--verbosity 9 \
--throw

run association between predicted expression and phenotype

Summary PrediXcan

download harmonized and imputed GWAS result for coronary artery disease


export PRE=/Users/haekyungim/Box/LargeFiles/QGT-Columbia-HKI
export DATA=$PRE/s-predixcan/data
export MODEL=$PRE/models
export METAXCAN=$PRE/MetaXcan-master/software
export OUTPUT=$PRE/results

echo $PRE
echo $DATA
echo $MODEL
echo $METAXCAN
echo $OUTPUT
/Users/haekyungim/Box/LargeFiles/QGT-Columbia-HKI
/Users/haekyungim/Box/LargeFiles/QGT-Columbia-HKI/s-predixcan/data
/Users/haekyungim/Box/LargeFiles/QGT-Columbia-HKI/models
/Users/haekyungim/Box/LargeFiles/QGT-Columbia-HKI/MetaXcan-master/software
/Users/haekyungim/Box/LargeFiles/QGT-Columbia-HKI/results



echo $PRE

run s-predixcan


export PRE=/Users/haekyungim/Box/LargeFiles/QGT-Columbia-HKI
export DATA=$PRE/s-predixcan/data
export MODEL=$PRE/models
export METAXCAN=$PRE/MetaXcan-master/software
export OUTPUT=$PRE/results

python $METAXCAN/SPrediXcan.py \
--gwas_file  $DATA/imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt.gz \
--snp_column panel_variant_id --effect_allele_column effect_allele --non_effect_allele_column non_effect_allele --zscore_column zscore \
--model_db_path $MODEL/gtex_v8_mashr/mashr_Whole_Blood.db \
--covariance $MODEL/gtex_v8_mashr/mashr_Whole_Blood.txt.gz \
--keep_non_rsid --additional_output --model_db_snp_key varID \
--throw \
--output_file $OUTPUT/spredixcan/eqtl/CARDIoGRAM_C4D_CAD_ADDITIVE__PM__Whole_Blood.csv

plot and interpret s-predixcan results

run multixcan (optional)


python $METAXCAN/SMulTiXcan.py \
--models_folder $DATA/models/eqtl/mashr \
--models_name_pattern "mashr_(.*).db" \
--snp_covariance $DATA/models/gtex_v8_expression_mashr_snp_covariance.txt.gz \
--metaxcan_folder $OUTPUT/spredixcan/eqtl/ \
--metaxcan_filter "CARDIoGRAM_C4D_CAD_ADDITIVE__PM__(.*).csv" \
--metaxcan_file_name_parse_pattern "(.*)__PM__(.*).csv" \
--gwas_file $OUTPUT/processed_summary_imputation/imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt.gz \
--snp_column panel_variant_id --effect_allele_column effect_allele --non_effect_allele_column non_effect_allele --zscore_column zscore --keep_non_rsid --model_db_snp_key varID \
--cutoff_condition_number 30 \
--verbosity 7 \
--throw \
--output $OUTPUT/smultixcan/eqtl/CARDIoGRAM_C4D_CAD_ADDITIVE_smultixcan.txt

Colocalization methods

fine-map GWAS results

estimate priors

calculate colocalization with fastENLOC

analyze results compare with s-predixcan results


sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.2

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] workflowr_1.6.2 Rcpp_1.0.4.6    rprojroot_1.3-2 digest_0.6.25  
 [5] later_1.0.0     R6_2.4.1        backports_1.1.6 git2r_0.26.1   
 [9] magrittr_1.5    evaluate_0.14   stringi_1.4.6   rlang_0.4.5    
[13] fs_1.4.1        promises_1.1.0  rmarkdown_2.1   tools_3.6.3    
[17] stringr_1.4.0   glue_1.4.1      httpuv_1.5.2    xfun_0.13      
[21] yaml_2.2.1      compiler_3.6.3  htmltools_0.4.0 knitr_1.28