Extract per-variant marginal univariate effects from a
fine-mapping entry or result. Returns a data.frame with identity
columns (variant_id, chrom, pos, A1, A2), context (N, MAF),
and the marginal effect columns (beta, se, z, p). Populated
uniformly across the individual-level and RSS paths.
Usage
getMarginalEffects(x, maxPval = NULL, ...)
# S4 method for class 'FineMappingResultBase'
getMarginalEffects(
x,
maxPval = NULL,
study = NULL,
context = NULL,
trait = NULL,
method = NULL,
region = NULL,
...
)Arguments
- x
A
FineMappingRoworFineMappingResult.- maxPval
Optional numeric (length 1). When non-
NULL, filter rows wherep > maxPval. DefaultNULL(no filter).- ...
Class-specific selection arguments.
- study
Character (length 1) or
NULL. Restrict the selection to this study;NULLmatches all studies.- context
Character (length 1) or
NULL. Restrict the selection to this context;NULLmatches all contexts.- trait
Character (length 1) or
NULL. Restrict the selection to this trait;NULLmatches all traits.- method
Character (length 1) or
NULL. Restrict the selection to this fine-mapping / weight method;NULLmatches all methods.- region
Character (length 1,
"chr:start-end") orNULL. Restrict variants to this region;NULLuses the full cis window / all regions.
Examples
data(qtlFineMappingExample)
getMarginalEffects(qtlFineMappingExample)
#> # A tibble: 2,828 × 16
#> study context trait blockId method variant_id chrom pos A1 A2 N
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <int> <chr> <chr> <dbl>
#> 1 study… contex… gene… NA susie chr22:321… chr22 3.21e7 C T 415
#> 2 study… contex… gene… NA susie chr22:321… chr22 3.21e7 G T 415
#> 3 study… contex… gene… NA susie chr22:321… chr22 3.21e7 G T 415
#> 4 study… contex… gene… NA susie chr22:321… chr22 3.21e7 C T 415
#> 5 study… contex… gene… NA susie chr22:321… chr22 3.21e7 G A 415
#> 6 study… contex… gene… NA susie chr22:321… chr22 3.21e7 C T 415
#> 7 study… contex… gene… NA susie chr22:321… chr22 3.21e7 A G 415
#> 8 study… contex… gene… NA susie chr22:321… chr22 3.21e7 G A 415
#> 9 study… contex… gene… NA susie chr22:321… chr22 3.21e7 T C 415
#> 10 study… contex… gene… NA susie chr22:321… chr22 3.21e7 C A 415
#> # ℹ 2,818 more rows
#> # ℹ 5 more variables: af <dbl>, beta <dbl>, se <dbl>, z <dbl>, p <dbl>