mbecSVA: Surrogate variable Analysis (SVA)

Description Usage Arguments Details Value

View source: R/mbecs_corrections.R

Description

Two step approach that (1.) identify the number of latent factors to be estimated by fitting a full-model with effect of interest and a null-model with no effects. The function 'num.sv()' then calculates the number of latent factors. In the next (2.) step, the sva function will estimate the surrogate variables. And adjust for them in full/null-model . Subsequent F-test gives significance values for each feature - these P-values and Q-values are accounting for surrogate variables (estimated BEs).

Usage

1
mbecSVA(input.obj, model.vars, type = "clr")

Arguments

input.obj

MbecData object

model.vars

Vector of covariate names. First element relates to batch.

type

Which abundance matrix to use, one of 'otu, tss, clr'. DEFAULT is 'clr'.

Details

The input for this function is supposed to be an MbecData object that contains total sum-scaled and cumulative log-ratio transformed abundance matrices. Output will be a vector of p-values.

Value

A vector of p-values that indicate significance of the batch-effect for the features.


buschlab/MBECS documentation built on Jan. 21, 2022, 1:27 a.m.