rmscols: Estimating microbiota composition

View source: R/composition.R

rmscolsR Documentation

Estimating microbiota composition

Description

Estimates the fraction of each genome in a sample, based on read counts and copy numbers for each amplicon cluster.

Usage

rmscols(rms.obj, trim = 0, reltol = 1e-06, verbose = TRUE)

Arguments

rms.obj

A list with the matrices Readcount.mat and Cpn.mat, see details below.

trim

Fraction of extreme readcounts to discard when fitting linear model.

reltol

Relative stopping tolerance for the iterative constrained least square search.

verbose

Logical, if TRUE text is written to the Console during computations.

Details

The rms.obj must be a list with the required data structures for performing a Constrained Ordinary Least Square estimation of abundances.

The rms.obj is typically constructed by the use of RMSobject. In this step the copy number matrix Cpn.mat is constructed, based on RMS fragments in a selection (database) of genomes.

In addition, a matrix of readcounts from one or more samples is required to be found in rms.obj$Readcount.mat, see readMapper and tutorial for more details on this.

Value

A matrix with one row for each genome in rms.obj$Cpn.mat and one column for each sample in rms.obj$Readcount.mat. Each column contains the estimated relative abundance for all genomes in the corresponding sample.

Author(s)

Lars Snipen.

See Also

RMSobject, readMapper.


larssnip/microRMS documentation built on July 19, 2023, 1:06 a.m.