fitFeatureModel: Computes differential abundance analysis using a...

Description Usage Arguments Value See Also Examples

View source: R/fitFeatureModel.R

Description

Wrapper to actually run zero-inflated log-normal model given a MRexperiment object and model matrix. User can decide to shrink parameter estimates.

Usage

1
fitFeatureModel(obj, mod, coef = 2, B = 1, szero = FALSE, spos = TRUE)

Arguments

obj

A MRexperiment object with count data.

mod

The model for the count distribution.

coef

Coefficient of interest to grab log fold-changes.

B

Number of bootstraps to perform if >1. If >1 performs permutation test.

szero

TRUE/FALSE, shrink zero component parameters.

spos

TRUE/FALSE, shrink positive component parameters.

Value

A list of objects including:

See Also

cumNorm

Examples

1
2
3
4
5
6
7
8
data(lungData)
lungData = lungData[,-which(is.na(pData(lungData)$SmokingStatus))]
lungData=filterData(lungData,present=30,depth=1)
lungData <- cumNorm(lungData, p=.5)
s <- normFactors(lungData)
pd <- pData(lungData)
mod <- model.matrix(~1+SmokingStatus, data=pd)
lungres1 = fitFeatureModel(lungData,mod)

metagenomeSeq documentation built on Nov. 8, 2020, 5:34 p.m.