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
marginalEffects(x, maxPval = NULL, ...)
# S4 method for class 'FineMappingResultBase'
marginalEffects(
x,
maxPval = NULL,
studyName = NULL,
context = NULL,
trait = NULL,
method = NULL,
region = NULL
)Arguments
- x
A
QtlFineMappingResultorGwasFineMappingResult.- maxPval
Optional numeric (length 1). When non-
NULL, filter rows wherep > maxPval. DefaultNULL(no filter).- ...
Class-specific selection arguments.
- studyName
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)
marginalEffects(qtlFineMappingExample)
#> # A tibble: 2,828 × 20
#> study context trait blockId method dataType dataSource standardized
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 study_1 context_1 gene_1 NA susie NA NA NA
#> 2 study_1 context_1 gene_1 NA susie NA NA NA
#> 3 study_1 context_1 gene_1 NA susie NA NA NA
#> 4 study_1 context_1 gene_1 NA susie NA NA NA
#> 5 study_1 context_1 gene_1 NA susie NA NA NA
#> 6 study_1 context_1 gene_1 NA susie NA NA NA
#> 7 study_1 context_1 gene_1 NA susie NA NA NA
#> 8 study_1 context_1 gene_1 NA susie NA NA NA
#> 9 study_1 context_1 gene_1 NA susie NA NA NA
#> 10 study_1 context_1 gene_1 NA susie NA NA NA
#> # ℹ 2,818 more rows
#> # ℹ 12 more variables: variant_id <chr>, chrom <chr>, pos <int>, A1 <chr>,
#> # A2 <chr>, N <dbl>, af <dbl>, beta <dbl>, se <dbl>, z <dbl>,
#> # z_supplied <lgl>, p <dbl>