You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it to possible to adjust the p-values from hypergeometric analysis for multiple testing?
I see on page 8 of the package documentation (https://bioconductor.org/packages/release/bioc/manuals/FELLA/man/FELLA.pdf) that there is a p.adjust argument for the enrich function. However, when I pass different options to the p.adjust argument (fdr, bonferroni, etc), it does not change the p-values for pathway enrichment. Should I calculate adjusted pvalues manually on the hypergeometric results table?
Code I am running is below.
Thank you.
Hi, the p-values are fdr-adjusted by default. The ellipsis in enrich() only passes on its arguments to runDiffusion() and runPagerank(). You can still use runHypergeom() with your preferred adjustment. Below is an example. We can check for the future if it is possible to make enrich() pass on arguments to runHypergeom().
# example on how to change p-value adjustment in hypergeom
library(FELLA)
library(magrittr)
data("FELLA.sample")
data("input.sample")
# enrich does not pass the p.adjust argument to runHypergeom# see ?enrich (only passes ellipsis along to runDiffusion, runPagerank)myAnalysis<- enrich(
compounds=input.sample,
method="hypergeom",
data=FELLA.sample)
df.default<- generateResultsTable(
method="hypergeom",
object=myAnalysis,
data=FELLA.sample,
threshold=1)
df.fdr<- defineCompounds(compounds=input.sample, data=FELLA.sample) %>%
runHypergeom(data=FELLA.sample, p.adjust="fdr") %>%
generateResultsTable(
object=.,
method="hypergeom",
data=FELLA.sample,
threshold=1)
df.none<- defineCompounds(compounds=input.sample, data=FELLA.sample) %>%
runHypergeom(data=FELLA.sample, p.adjust="none") %>%
generateResultsTable(
object=.,
method="hypergeom",
data=FELLA.sample,
threshold=1)
# default is fdr df.default$p.value# same as manually setting fdrdf.fdr$p.value# or manually adjusting "none"
p.adjust(df.none$p.value, method="fdr")
# unadjusted p-valuesdf.none$p.value
Hello,
Is it to possible to adjust the p-values from hypergeometric analysis for multiple testing?
I see on page 8 of the package documentation (https://bioconductor.org/packages/release/bioc/manuals/FELLA/man/FELLA.pdf) that there is a p.adjust argument for the enrich function. However, when I pass different options to the p.adjust argument (fdr, bonferroni, etc), it does not change the p-values for pathway enrichment. Should I calculate adjusted pvalues manually on the hypergeometric results table?
Code I am running is below.
Thank you.
analysis.hypergeometric <- enrich(
compounds = cpd.kegg.id,
data = fella.data,
method = "hypergeom",
p.adjust = "fdr",
approx = "normality")
table.hypergeometric <- generateResultsTable( #FELLA github issue 14 - try to identify CompoundHits for each pathway: #14
object = analysis.hypergeometric,
plimit = 30, threshold = 0.05,
data = fella.data,
method = "hypergeom",
NamesAsLabels = TRUE)
table.hypergeometric$p.adjust <- p.adjust(table.hypergeometric$p.value, method="BH")
table.hypergeometric$p.adjust <- p.adjust(table.hypergeometric$p.value, method="bonferroni")
The text was updated successfully, but these errors were encountered: