add_adjusted_pvalues: Add adjusted pvalues

add_adjusted_pvaluesR Documentation

Add adjusted pvalues

Description

Add adjusted pvalues

Usage

add_adjusted_pvalues(object, ...)

## S3 method for class 'data.table'
add_adjusted_pvalues(
  object,
  method = "fdr",
  fit = fits(object),
  coefs = default_coefs(object, fit = fit),
  verbose = TRUE,
  ...
)

## S3 method for class 'SummarizedExperiment'
add_adjusted_pvalues(
  object,
  method = "fdr",
  fit = fits(object),
  coefs = default_coefs(object, fit = fit),
  verbose = TRUE,
  ...
)

Arguments

object

SummarizedExperiment or (feature) data.table

...

for s3 dispatch

method

'fdr', 'bonferroni', ... (see 'p.adjust.methods')

fit

'limma', 'lm', 'lme', 'lmer'

coefs

coefficient (string)

verbose

TRUE or FALSE

Value

SummarizedExperiment

Examples

file <- system.file('extdata/fukuda20.proteingroups.txt', package = 'autonomics')
object <- read_maxquant_proteingroups(file)
fdt(object) %<>% extract(, 1:2)
object %<>% fit_limma(coef = 'Adult-X30dpt')
object %<>% extract(order(fdt(.)$`p~Adult-X30dpt~limma`), )
 fdt(object)
(fdt(object) %<>% add_adjusted_pvalues('fdr'))
(fdt(object) %<>% add_adjusted_pvalues('fdr'))      # smart enough not to add second column
(fdt(object)  %>% add_adjusted_pvalues('bonferroni'))

bhagwataditya/importomics documentation built on Nov. 28, 2024, 8:28 a.m.