Feature score from the fraction of significant deviation contrasts
Source:R/mashPipeline.R
nSignificantScore.RdFor each condition's deviation contrast, the proportion of variants whose
contrast p-value falls below pCutoff – the "n-significant" feature
score of mash_posterior.ipynb. No meta-analysis is involved.
Arguments
- contrastResult
A contrast table from
mashPosteriorContrastcarryingp_contrast_*_deviationcolumns.- pCutoff
Significance threshold (default 1e-5).
Examples
om <- matrix(c(0.1, 0.2, 0.3), 1, 3,
dimnames = list("chr1:100:A:G", c("a", "b", "c")))
pm <- matrix(c(0.5, 0.3, -0.2), 1, 3,
dimnames = list("chr1:100:A:G", c("a", "b", "c")))
pv <- array(diag(3) * 0.1, dim = c(3, 3, 1))
dimnames(pv) <- list(c("a", "b", "c"), c("a", "b", "c"), NULL)
cr <- fitMashContrast(1L, om, pm, pv)
nSignificantScore(cr, pCutoff = 0.05)
#> # A tibble: 3 × 2
#> condition ratio
#> <chr> <dbl>
#> 1 a 0
#> 2 b 0
#> 3 c 0