Computes differential abundance analysis using a zero-inflated log-normal model

Share:

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:

  • call - the call made to fitFeatureModel

  • fitZeroLogNormal - list of parameter estimates for the zero-inflated log normal model

  • design - model matrix

  • taxa - taxa names

  • counts - count matrix

  • pvalues - calculated p-values

  • permuttedfits - permutted z-score estimates under the null

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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.