mp_filter_taxa-methods: Filter OTU (Features) By Abundance Level

mp_filter_taxaR Documentation

Filter OTU (Features) By Abundance Level

Description

Filter OTU (Features) By Abundance Level

Usage

mp_filter_taxa(
  .data,
  .abundance = NULL,
  min.abun = 0,
  min.prop = 0.05,
  include.lowest = FALSE,
  ...
)

## S4 method for signature 'MPSE'
mp_filter_taxa(
  .data,
  .abundance = NULL,
  min.abun = 0,
  min.prop = 0.05,
  include.lowest = FALSE,
  ...
)

## S4 method for signature 'tbl_mpse'
mp_filter_taxa(
  .data,
  .abundance = NULL,
  min.abun = 0,
  min.prop = 0.05,
  include.lowest = FALSE,
  ...
)

## S4 method for signature 'grouped_df_mpse'
mp_filter_taxa(
  .data,
  .abundance = NULL,
  min.abun = 0,
  min.prop = 0.05,
  include.lowest = FALSE,
  ...
)

Arguments

.data

MPSE or tbl_mpse or grouped_df_mpse object.

.abundance

the column names of abundance, default is NULL, meaning the 'Abundance' column.

min.abun

numeric minimum abundance required for each one sample default is 0 (.abundance=Abundance or NULL), meaning the abundance of OTU (Features) for each one sample should be >= 0.

min.prop

numeric minimum proportion of samples that contains the OTU (Features) when min.prop larger than 1, meaning the minimum number of samples that contains the OTU (Features).

include.lowest

logical whether include the lower boundary of min.abun default is FALSE ( > min.abun), if it is TRUE, meaning (>= min.abun).

...

additional parameters, meaningless now.

Author(s)

Shuangbin Xu

Examples

data(mouse.time.mpse)
mouse.time.mpse %>% mp_filter_taxa(.abundance=Abundance, min.abun=1, min.prop=1)
# For tbl_mpse object.
mouse.time.mpse %>% as_tibble %>% mp_filter_taxa(.abundance=Abundance, min.abun=1, min.prop=1)
# This also can be done using group_by, filter of dplyr.
mouse.time.mpse %>% 
 dplyr::group_by(OTU) %>% 
 dplyr::filter(sum(Abundance>=1)>=1)

xiangpin/MicrobitaProcess documentation built on Nov. 6, 2024, 1:15 a.m.