Skip to contents

Genome-wide pipeline that computes per-pair (GWAS study, QTL context) enrichment estimates by passing the GWAS PIP vector and the QTL credible-set posteriors to qtlEnrichment. The returned table feeds colocPipeline via its enrichment argument.

Not gene-parallelisable: the enrichment estimator runs over the full genome of GWAS PIPs and the full collection of QTL fits at once.

Usage

qtlEnrichmentPipeline(
  gwasFineMappingResult,
  qtlFineMappingResult,
  numGwas = NULL,
  piQtl = NULL,
  lambda = 1,
  impN = 25,
  numThreads = 1L,
  seed = NULL,
  ...
)

Arguments

gwasFineMappingResult

See above.

qtlFineMappingResult

See above.

numGwas

Number of GWAS variants used to estimate piGwas. When NULL (default) it is estimated from the data – bias warning applies if the input PIP vector is not genome-wide.

piQtl

Per-variant prior of being a QTL causal variant. NULL (default) estimates from the data.

lambda

Shrinkage parameter for the enrichment estimator. Default 1.0.

impN

Number of imputed samples used by the estimator. Default 25.

numThreads

Number of threads used by qtlEnrichment. Default 1.

seed

Integer or NULL. Base random seed forwarded to qtlEnrichment for reproducible multiple imputation. NULL (default) draws a nondeterministic seed.

...

Additional arguments forwarded to qtlEnrichment.

Value

A tibble with one row per (gwasStudy, qtlStudy, qtlContext) triple and columns gwasStudy, qtlStudy, qtlContext, enrichment, enrichmentSe, enrichmentLogOdds, plus any extras the underlying estimator emits. Suitable as the enrichment argument to colocPipeline (which joins on the same triple).

Inputs

  • gwasFineMappingResult: a genome-wide GwasFineMappingResult (one row per (study, LD block) tuple). Each entry's FineMappingRow$trimmedFit must carry a pip vector.

  • qtlFineMappingResult: the genome-wide QtlFineMappingResult. Each entry's trimmedFit must carry alpha, pip, and prior-variance fields (V).

LD-sketch identity check

The GWAS FineMappingResultBase must have a non-NULL ldSketch (RSS-derived). If the QTL FMR also has a non-NULL ldSketch, the two must match exactly. When the QTL FMR's ldSketch is NULL (individual-level QTL fit), validation is skipped on the QTL side.

Examples

data(gwasFineMappingExample)
data(qtlFineMappingExample)
qtlEnrichmentPipeline(
  gwasFineMappingResult = gwasFineMappingExample,
  qtlFineMappingResult = qtlFineMappingExample
)
#> Warning: numGwas is not provided. Estimating piGwas from the data. Note that this estimate may be biased if the input gwasPip does not contain genome-wide variants.
#> Estimated piGwas: 0.00141
#> Warning: piQtl is not provided. Estimating piQtl from the data. Note that this estimate may be biased if either 1) the input susieQtlRegions does not have enough data, or 2) the single effects only include variables inside of credible sets or signal clusters.
#> Estimated piQtl: 0.00071
#> Fine-mapped GWAS and QTL data loaded successfully for enrichment analysis!
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 0
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 1
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 2
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 3
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 4
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 5
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 6
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 7
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 8
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 9
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 10
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 11
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 12
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 13
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 14
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 15
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 16
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 17
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 18
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 19
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 20
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 21
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 22
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 23
#> Proportion of xQTL missing from GWAS variants: 0 in MI round 24
#> EM updates completed!
#> Outlier filtering removed 1 MI round(s)
#> # A tibble: 1 × 6
#>   gwasStudy qtlStudy qtlContext enrichment enrichmentSe enrichmentLogOdds
#>   <chr>     <chr>    <chr>           <dbl>        <dbl>             <dbl>
#> 1 study_1   study_1  context_1          NA           NA                NA