Integrate molecular-QTL results with GWAS using enrichment, colocalization, TWAS, cTWAS, quantile TWAS, or INTACT.
Miniprotocol Timing¶
This is the total duration for the selected route; module-specific timings appear on their respective pages. Timing: TBD
Overview¶
This mini-protocol presents complementary routes for connecting molecular-QTL and GWAS evidence. Steps 1–2 call SuSiE_enloc.ipynb, steps 3–7 call twas_ctwas.ipynb, and step 8 calls intact.ipynb.
Enrichment, colocalization, standard TWAS, cTWAS, quantile TWAS, and INTACT answer different questions and are not one mandatory chain. Only cTWAS steps 4–6 must be run sequentially.
Steps¶
Choose a route before running commands; the commands are not one mandatory chain.
| Analysis goal | Commands to run, in order | Inputs |
|---|---|---|
| Estimate global xQTL–GWAS enrichment | 1 | tests/fixtures/susie_enloc/protocol_example.enloc.gwas_meta.tsv; tests/fixtures/susie_enloc/protocol_example.enloc.xqtl_meta.tsv; fine-mapping objects referenced by those tables |
| Test pairwise colocalization | 2 | The same GWAS and xQTL fine-mapping metadata as step 1 |
| Run standard TWAS and MR | 3 | tests/fixtures/twas/protocol_example.twas.gwas_meta.tsv; tests/fixtures/twas/protocol_example.twas.xqtl_meta.tsv; tests/fixtures/ld_reference/ld_meta_file.tsv; tests/fixtures/twas/protocol_example.twas.LD_blocks.chr22.bed; tests/fixtures/twas/protocol_example.twas.data_type_table.txt |
| Fine-map genes and SNPs jointly with cTWAS | 4 → 5 → 6 | GWAS, xQTL, LD-reference, and region metadata used by the TWAS route |
| Run quantile TWAS | 7 | The TWAS inputs, with quantile-specific molecular-QTL weights |
| Combine PTWAS and fastenloc evidence | 8 | tests/fixtures/intact/protocol_example.ptwas.output; tests/fixtures/intact/protocol_example.fastenloc.gene.out |
Run only the commands for the selected route. Steps 4–6 are one chained cTWAS analysis; the other numbered steps are independent alternatives.
1. Estimate global xQTL–GWAS enrichment¶
What it does: Estimates whether fine-mapped xQTL signals are enriched among GWAS signals across many regions and molecular contexts.
Timing: TBD
sos run pipeline/SuSiE_enloc.ipynb xqtl_gwas_enrichment \
--gwas-meta-data tests/fixtures/susie_enloc/protocol_example.enloc.gwas_meta.tsv \
--xqtl-meta-data tests/fixtures/susie_enloc/protocol_example.enloc.xqtl_meta.tsv \
--xqtl-finemapping-obj preset_variants_result susie_result_trimmed \
--xqtl-varname-obj preset_variants_result variant_names \
--gwas-finemapping-obj AD_Bellenguez_2022 RSS_QC_RAISS_imputed susie_result_trimmed \
--gwas-varname-obj AD_Bellenguez_2022 RSS_QC_RAISS_imputed variant_names \
--xqtl-region-obj region_info grange \
--qtl-path output/xqtl_gwas_enrichment/susie_enloc_data \
--gwas-path output/xqtl_gwas_enrichment/susie_enloc_data \
--context-meta tests/fixtures/susie_enloc/protocol_example.enloc.context_meta.tsv \
--cwd output/xqtl_gwas_enrichment2. Test pairwise colocalization¶
What it does: Tests whether an xQTL and GWAS association in the same region are consistent with a shared causal variant.
Timing: TBD
sos run pipeline/SuSiE_enloc.ipynb susie_coloc \
--gwas-meta-data tests/fixtures/susie_enloc/protocol_example.enloc.gwas_meta.tsv \
--xqtl-meta-data tests/fixtures/susie_enloc/protocol_example.enloc.xqtl_meta.tsv \
--xqtl-finemapping-obj preset_variants_result susie_result_trimmed \
--xqtl-varname-obj preset_variants_result variant_names \
--gwas-finemapping-obj AD_Bellenguez_2022 RSS_QC_RAISS_imputed susie_result_trimmed \
--gwas-varname-obj AD_Bellenguez_2022 RSS_QC_RAISS_imputed variant_names \
--xqtl-region-obj region_info grange \
--qtl-path output/xqtl_gwas_enrichment/susie_enloc_data \
--gwas-path output/xqtl_gwas_enrichment/susie_enloc_data \
--context-meta tests/fixtures/susie_enloc/protocol_example.enloc.context_meta.tsv \
--ld-meta-file-path tests/fixtures/ld_reference/ld_meta_file.tsv \
--skip-enrich \
--cwd output/susie_coloc3. Run standard TWAS and MR¶
What it does: Tests genetically predicted molecular traits for association with the GWAS trait and reports regional Mendelian-randomization results.
Timing: TBD
sos run pipeline/twas_ctwas.ipynb twas \
--cwd output --name protocol_example \
--gwas_meta_data tests/fixtures/twas/protocol_example.twas.gwas_meta.tsv \
--xqtl_meta_data tests/fixtures/twas/protocol_example.twas.xqtl_meta.tsv \
--ld_meta_data tests/fixtures/ld_reference/ld_meta_file.tsv \
--ld_reference_sample_size 17000 \
--regions tests/fixtures/twas/protocol_example.twas.LD_blocks.chr22.bed \
--xqtl_type_table tests/fixtures/twas/protocol_example.twas.data_type_table.txt \
--rsq_pval_cutoff 0.05 --rsq_cutoff 0.01 \
--region-name chr22_10000000_190000004. Assemble cTWAS region data¶
What it does: Harmonizes GWAS statistics, xQTL weights, and LD for the regions that will enter cTWAS fine-mapping.
Timing: TBD
sos run pipeline/twas_ctwas.ipynb ctwas \
--cwd output --name protocol_example \
--thin 1 --prior_var_structure shared_all \
--gwas_meta_data tests/fixtures/twas/protocol_example.twas.gwas_meta.tsv \
--xqtl_meta_data tests/fixtures/twas/protocol_example.twas.xqtl_meta.tsv \
--ld_meta_data tests/fixtures/ld_reference/ld_meta_file.tsv \
--regions tests/fixtures/twas/protocol_example.twas.LD_blocks.chr22.bed \
--twas_weight_cutoff 0 \
--region-name chr22_10000000_190000005. Estimate cTWAS global parameters¶
What it does: Reuses the assembled inputs from step 4 to estimate the prior parameters required by cTWAS.
Timing: TBD
sos run pipeline/twas_ctwas.ipynb ctwas \
--run_param_est --skip_assembly --thin 1 \
--prior_var_structure shared_all \
--cwd output --name protocol_example \
--gwas_meta_data tests/fixtures/twas/protocol_example.twas.gwas_meta.tsv \
--xqtl_meta_data tests/fixtures/twas/protocol_example.twas.xqtl_meta.tsv \
--ld_meta_data tests/fixtures/ld_reference/ld_meta_file.tsv \
--regions tests/fixtures/twas/protocol_example.twas.LD_blocks.chr22.bed6. Fine-map genes and SNPs with cTWAS¶
What it does: Uses the assembled inputs and estimated parameters to calculate joint posterior inclusion probabilities for genes and SNPs.
Timing: TBD
sos run pipeline/twas_ctwas.ipynb ctwas \
--run_finemapping --skip_assembly \
--prior_var_structure shared_all \
--cwd output --name protocol_example \
--gwas_meta_data tests/fixtures/twas/protocol_example.twas.gwas_meta.tsv \
--xqtl_meta_data tests/fixtures/twas/protocol_example.twas.xqtl_meta.tsv \
--ld_meta_data tests/fixtures/ld_reference/ld_meta_file.tsv \
--regions tests/fixtures/twas/protocol_example.twas.LD_blocks.chr22.bed \
--region-name chr22_10000000_190000007. Run quantile TWAS¶
What it does: Runs the quantile-TWAS route for molecular-trait effects that may differ across the phenotype distribution.
Timing: TBD
sos run pipeline/twas_ctwas.ipynb quantile_twas \
--cwd output --name protocol_example \
--gwas_meta_data tests/fixtures/twas/protocol_example.twas.gwas_meta.tsv \
--xqtl_meta_data tests/fixtures/twas/protocol_example.twas.xqtl_meta.tsv \
--ld_meta_data tests/fixtures/ld_reference/ld_meta_file.tsv \
--ld_reference_sample_size 17000 \
--regions tests/fixtures/twas/protocol_example.twas.LD_blocks.chr22.bed \
--xqtl_type_table tests/fixtures/twas/protocol_example.twas.data_type_table.txt \
--region-name chr22_10000000_190000008. Combine PTWAS and colocalization with INTACT¶
What it does: Combines PTWAS z-scores with fastenloc colocalization probabilities to prioritize genes supported by both association and colocalization evidence.
Timing: TBD
sos run pipeline/intact.ipynb intact \
--fastenloc-file tests/fixtures/intact/protocol_example.fastenloc.gene.out \
--ptwas-file tests/fixtures/intact/protocol_example.ptwas.output \
--tissue DLPFC \
--cwd output/intactOutput¶
| Step | Relative path | Contents |
|---|---|---|
| 1 | output/xqtl_gwas_enrichment/<name>.<context>.enrichment.rds | Global enrichment estimate for each GWAS–xQTL-context pair |
| 2 | output/susie_coloc/susie_coloc/<name>.<context>@<gene>.coloc.rds | Regional SuSiE colocalization probabilities |
| 3 | output/twas/twas/<name>.<region_id>.<gene>.twas.rds | Per-gene TWAS results |
| 3 | output/twas/twas/<name>.<region_id>.twas.tsv.gz | Regional TWAS summary |
| 3 | output/twas/twas/<name>.<region_id>.mr_result.tsv.gz | Regional Mendelian-randomization summary |
| 4 | output/ctwas/<name>.ctwas_inputs.rds | Assembled cTWAS inputs |
| 5 | output/ctwas/<name>.ctwas_est.rds | Estimated cTWAS prior parameters |
| 6 | output/ctwas/<name>.ctwas_finemap.rds | Joint gene and SNP fine-mapping results |
| 7 | output/quantile_twas/<name>.* | Quantile-TWAS results, with stems determined by the analysis regions |
| 8 | output/intact/DLPFC.INTACT.rds | Gene-level INTACT posterior probabilities |
Some workflows derive context, gene, or region identifiers from metadata, so their output contains one file per analysis unit.
Anticipated Results¶
Enrichment evaluates global sharing between molecular-QTL and GWAS signals, whereas colocalization evaluates individual regions. TWAS prioritizes traits whose genetically predicted levels associate with the GWAS outcome; cTWAS jointly fine-maps genes and SNPs; INTACT prioritizes genes supported by both PTWAS and colocalization.
These analyses provide complementary evidence, not interchangeable proof of causality. Interpret prioritized genes together with fine-mapping quality, LD, prediction performance, colocalization support, tissue relevance, and sensitivity analyses.
Command Interface¶
sos run pipeline/SuSiE_enloc.ipynb -hsos run pipeline/twas_ctwas.ipynb -hsos run pipeline/intact.ipynb -h