mp_filter_taxa {MicrobiotaProcess} | R Documentation |
Filter OTU (Features) By Abundance Level
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, ... )
.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 |
... |
additional parameters, meaningless now. |
Shuangbin Xu
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)