analyze: Analyze

View source: R/4_analyze.R

analyzeR Documentation

Analyze

Description

Analyze

Usage

analyze(
  object,
  pca = TRUE,
  pls = TRUE,
  fit = "limma",
  formula = ~subgroup,
  drop = varlevels_dont_clash(object, all.vars(formula)),
  codingfun = contr.treatment.explicit,
  contrasts = NULL,
  coefs = contrast_coefs(object, formula = formula, drop = drop, codingfun = codingfun),
  block = NULL,
  weightvar = if ("weights" %in% assayNames(object)) "weights" else NULL,
  plot = pca & !is.null(fit),
  label = "feature_id",
  palette = NULL,
  verbose = TRUE
)

Arguments

object

SummarizedExperiment

pca

TRUE / FALSE: perform pca ?

pls

TRUE / FALSE: perform pls ?

fit

linmod engine: 'limma', 'lm', 'lme(r)', 'lmer', 'wilcoxon'

formula

model formula

drop

TRUE / FALSE : drop varname in designmat ?

codingfun

factor coding function

  • contr.treatment: intercept = y0, coefi = yi - y0

  • contr.treatment.explicit: intercept = y0, coefi = yi - y0

  • code_control: intercept = ymean, coefi = yi - y0

  • contr.diff: intercept = y0, coefi = yi - y(i-1)

  • code_diff: intercept = ymean, coefi = yi - y(i-1)

  • code_diff_forward: intercept = ymean, coefi = yi - y(i+)

  • code_deviation: intercept = ymean, coefi = yi - ymean (drop last)

  • code_deviation_first: intercept = ymean, coefi = yi - ymean (drop first)

  • code_helmert: intercept = ymean, coefi = yi - mean(y0:(yi-1))

  • code_helmert_forward: intercept = ymean, coefi = yi - mean(y(i+1):yp)

contrasts

model coefficient contrasts of interest: string vector or NULL

coefs

model coefficients of interest: string vector or NULL

block

model blockvar

weightvar

NULL or name of weight matrix in assays(object)

plot

TRUE / FALSE

label

fvar

palette

NULL or colorvector

verbose

TRUE / FALSE: message?

Value

SummarizedExperiment

Examples

file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
object <- read_metabolon(file)
object %<>% analyze()

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