View source: R/resolve_comparisons.R
resolve_comparisons | R Documentation |
The fit_repac()
function will perform all pairwise comparisons among the PAS of a
gene. This is done to mantain flexibility to decide how the comparisons among PAS
are made.
resolve_comparisons()
will resolve the comparisons according to the strategy selected
and output a reduced set of results.
resolve_comparisons(
data,
threshold = 0.05,
resolve.by = c("significance", "closest", "longest")
)
data |
A list of tibbles outputed by |
threshold |
Significance cut-off for the "closest" and "longest" strategies. |
resolve.by |
The strategy to be applied. |
The "significance"is the default strategy to resolve the comparisons. This strategy will simply keep the most significant comparisons for each reference site. The "closest" strategy updates the reference site to the current site when these sites have significantly differences in compositions. Finally, the "longest" strategy is the strategy described in the REPAC manuscript, in which the reference is kept until a it no longer has significant differences in compositions with the site being tested, at which point it is updated to the current site.
A tibble with adjusted p-values.
Eddie Imada
## fit model and test for DPU
groups <- rep(c("A", "B"), each=5)
dMat <- model.matrix(~ 0+groups)
colnames(dMat) <- gsub("groups", "",colnames(dMat))
cMat <- makeContrasts(
levels=colnames(dMat),
BvsS= B - A
)
results <- fit_repac(se, dMat, cMat)
results <- resolve_comparisons(results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.