Skip to contents

Reconciles per-condition (univariate) SuSiE fine-mapping into a single set of merged credible sets. Each row of the supplied QtlFineMappingResult is treated as one condition (its topLoci carrying that condition's credible sets); credible sets that share variants across conditions are unioned via connected components, and every variant is reported with its merged credible-set label plus the maximum and median PIP across the conditions it appears in. A typical use is selecting a representative lead variant per merged credible set to assemble the "strong" input for mashPipeline.

Usage

mergeSusieCs(fineMappingResult, coverage = 0.95)

Arguments

fineMappingResult

A QtlFineMappingResult (or any FineMappingResult) produced by per-condition SuSiE fine-mapping. Each entry's topLoci must carry a credible-set column (cs_<coverage*100>, e.g. cs_95, with values such as "susie_1" where the trailing integer is the set index and _0 means "not in a credible set") and a PIP column.

coverage

Credible-set coverage level selecting the cs_* column (default 0.95 -> cs_95).

Value

A data.frame with one row per variant: variant_id, credibleSetNames (the merged credible-set label), maxPip and medianPip; or NULL when no credible sets are present.

Examples

data(qtlFineMappingExample)
mergeSusieCs(fineMappingResult = qtlFineMappingExample)
#> # A tibble: 14 × 4
#>    variant_id         credibleSetNames maxPip medianPip
#>    <chr>              <chr>             <dbl>     <dbl>
#>  1 chr22:32724254:T:C cs_1_1           0.0443    0.0443
#>  2 chr22:32724508:C:A cs_1_1           0.0443    0.0443
#>  3 chr22:32728910:G:A cs_1_1           0.0395    0.0395
#>  4 chr22:32729588:T:C cs_1_1           0.0345    0.0345
#>  5 chr22:32732510:G:A cs_1_1           0.0685    0.0685
#>  6 chr22:32734332:A:G cs_1_1           0.0663    0.0663
#>  7 chr22:32737583:C:T cs_1_1           0.0411    0.0411
#>  8 chr22:32737848:A:G cs_1_1           0.0663    0.0663
#>  9 chr22:32740783:T:C cs_1_1           0.0663    0.0663
#> 10 chr22:32743285:A:C cs_1_1           0.0663    0.0663
#> 11 chr22:32745710:T:C cs_1_1           0.0770    0.0770
#> 12 chr22:32745749:T:C cs_1_1           0.0364    0.0364
#> 13 chr22:32752021:A:G cs_1_1           0.0364    0.0364
#> 14 chr22:32755495:C:T cs_1_1           0.0365    0.0365