### Data frame with absolute abundance (reads)###
### And first column of OTUID and last column of taxonomy ###
data(testotu)
#### If your data frame does not contain the OTUID column or taxonomy column,
#### you can add a simulated column to fit the input format like testotu ##
### 1. Filter OTU with total relative abundance below 0.0001###
filtered_otu <- Filter_function(
input = testotu,
threshold = 0.0001,
format = 1
)
### 2. Filter OTU with total reads below 20 ###
filtered_otu <- Filter_function(
input = testotu,
threshold = 20,
format = 2
)
### 3. Filter OTU reads 0 over (>=) 11 samples ###
filtered_otu <- Filter_function(
input = testotu,
threshold = 11,
format = 3
)
### 4. Filter OTU with relative abundance below 0.0001 in each sample ###
filtered_otu <- Filter_function(
input = testotu,
threshold = 0.0001,
format = 4
)
Run the code above in your browser using DataLab