drop_taxa {MicrobiotaProcess} | R Documentation

## Dropping Species with Few abundance and Few Occurrences

### Description

Drop species or features from the feature data frame or phyloseq that occur fewer than or equal to a threshold number of occurrences and fewer abundance than to a threshold abundance.

### Usage

    drop_taxa(obj, ...)

    ## S4 method for signature 'data.frame'
    drop_taxa(obj, minocc = 0, minabu = 0, ...)

    ## S4 method for signature 'phyloseq'
    drop_taxa(obj, ...)

### Arguments

`obj` | object, phyloseq or a dataframe of species (n_sample, n_feature).
`...,` | additional parameters.
`minocc` | numeric, the threshold number of occurrences to be dropped, if < 1.0,it will be the threshold ratios of occurrences, default is 0.
`minabu` | numeric, the threshold abundance, if fewer than the threshold will be dropped, default is 0.

### Value

dataframe of new features.

### Author(s)

Shuangbin Xu

### Examples

    otudafile <- system.file("extdata", "otu_tax_table.txt",
                             package="MicrobiotaProcess")
    otuda <- read.table(otudafile, sep="\t",
                        header=TRUE, row.names=1,
                        check.names=FALSE, skip=1,
                        comment.char="")
    otuda <- otuda[sapply(otuda, is.numeric)]
    dim(otuda)
    otudat <- drop_taxa(otuda, minocc=0.1, minabu=1)
    dim(otudat)
    data(test_otu_data)
    keepps <- drop_taxa(test_otu_data, minocc=0.1, minabu=0)

[Package MicrobiotaProcess version 1.0.5 Index]