dot-mbecSetData: Mbec-Data Setter

Description Usage Arguments Value Examples

Description

Sets and/or replaces selected feature abundance matrix and handles correct orientation. The argument type determines which slot to access, i.e. the base matrices for un-transformed counts "otu", total sum-scaled counts "tss", cumulative log-ratio transformed counts "clr" and batch effect corrected counts "cor" and assessment vectors "ass". The later two additionally require the use of the argument 'label' that specifies the name within the respective lists of corrections and assessments.

Usage

1
2
3
4
5
6
.mbecSetData(
  input.obj,
  new.cnts = NULL,
  type = c("otu", "ass", "cor", "clr", "tss"),
  label = character()
)

Arguments

input.obj

MbecData object to work on.

new.cnts

A matrix-like object with same dimension as 'otu_table' in input.obj.

type

Specify which type of data to add, by using one of 'ass' (Assessement), 'cor' (Correction), 'clr' (Cumulative Log-Ratio) or 'tss' (Total Scaled-Sum).

label

For types 'ass' and 'cor' this sets the name within the lists.

Value

Input object with updated attributes.

Examples

1
2
3
4
5
6
7
8
# This will fill the 'tss' slot with the supplied matrix.
MBEC.obj <- mbecSetData(input.obj=dummy.mbec, new.cnts=dummy.list$cnts,
    type='tss')

# This will put the given matrix into the list of corrected counts under the
# name "nameOfMethod".
MBEC.obj <- mbecSetData(input.obj=dummy.mbec, new.cnts=dummy.list$cnts,
    type='cor', label="nameOfMethod")

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