mp_rrarefy-methods: mp_rrarefy method

mp_rrarefyR Documentation

mp_rrarefy method

Description

mp_rrarefy method

Usage

mp_rrarefy(
  .data,
  .abundance = NULL,
  raresize,
  trimOTU = FALSE,
  trimSample = FALSE,
  seed = 123,
  ...
)

## S4 method for signature 'MPSE'
mp_rrarefy(
  .data,
  .abundance = NULL,
  raresize,
  trimOTU = FALSE,
  trimSample = FALSE,
  seed = 123,
  ...
)

## S4 method for signature 'tbl_mpse'
mp_rrarefy(
  .data,
  .abundance = NULL,
  raresize,
  trimOTU = FALSE,
  trimSample = FALSE,
  seed = 123,
  ...
)

## S4 method for signature 'grouped_df_mpse'
mp_rrarefy(
  .data,
  .abundance = NULL,
  raresize,
  trimOTU = FALSE,
  trimSample = FALSE,
  seed = 123,
  ...
)

Arguments

.data

MPSE or tbl_mpse object

.abundance

the name of OTU(feature) abundance column, default is Abundance.

raresize

integer Subsample size for rarefying community.

trimOTU

logical Whether to remove the otus that are no longer present in any sample after rarefaction

trimSample

logical whether to remove the samples that do not have enough abundance (raresize), default is FALSE.

seed

a random seed to make the rrarefy reproducible, default is 123.

...

additional parameters, meaningless now.

Value

update object

Author(s)

Shuangbin Xu

See Also

[mp_extract_assays()] and [mp_decostand()]

Examples

data(mouse.time.mpse)
mouse.time.mpse %>% mp_rrarefy()

xiangpin/MicrobiotaProcess documentation built on Nov. 12, 2024, 2:05 p.m.