Learn R Programming

MicrobiomeSurv (version 0.1.0)

SecondFilter: This function is used for the second step of filtering which removes OTUs based on a threshold.

Description

This function is used for the second step of filtering which removes OTUs based on a threshold.

Usage

SecondFilter(zero.per.group, Micro.mat, threshold = 0.7, week = 0)

Value

A smaller microbiome matrix.

Micro.mat.new

an smaller OTU matrix with less OTUs

Arguments

zero.per.group

a n x 9 matrix. Columns are number of zero in control groups, proportion of zeros in control group, number of subject in control group, number of zero in treated groups, proportion of zeros in treated group, number of subject in treated group, total number of zeros, proportion of zeros in total, number of subject

Micro.mat

OTU matrix (rows are otus, columns are subjects)

threshold

user can choose. For instance, if threshold is 0.7, the function will remove OTUs having at least 70% of zeros in one of two groups

week

A specific time point. To use when having different time points in the dataset.

Author

Thi Huyen Nguyen, thihuyen.nguyen@uhasselt.be

Olajumoke Evangelina Owokotomo, olajumoke.x.owokotomo@gsk.com

Ziv Shkedy

See Also

SecondFilter

SecondFilter

Examples

Run this code
# Read dataset
data(Week3_otu)
Week3_otu = data.frame(Week3_otu)
otu_mat_w3 = t(data.matrix(Week3_otu[ , 1:2720]))

# Import dataset from the result of zero_per_group
data(data_zero_per_group_otu_w3)

# Using the function
otu_trim_w3 = SecondFilter(zero.per.group = data_zero_per_group_otu_w3,
                           Micro.mat = otu_mat_w3, threshold = 0.7, week = 3)

Run the code above in your browser using DataLab