count_based_filter: Count filter object

Description Usage Arguments Value Author(s) References Examples

Description

This function returns a countFilter object, performing all of the calculations needed to filter the data based off a specified function and limit

Usage

1
count_based_filter(omicsData, fn = "sum", group = FALSE, group_var = NULL)

Arguments

omicsData

An object of one of the classes "seqData"

fn

Specify "mean" to use the mean count of each OTU, "percent" to use mean counts lower than a certain percent, "max" to use the max count across all samples, "sum" to use the total count of each OTU, "nonmiss" to use presence/absence counts, or "ka" to use k over a filtering (need at least k counts of OTUs seen in at least a samples).

group

Logical, should filtering function be performed separately for specified groups. Default is FALSE.

group_var

Character, if filtering should be performed separately for specified groups, then specify which grouping variable to use. If group = TRUE and group_var = NULL, will use 'Group' from attr(omicsData, "group_DF"). Default is NULL.

Value

An object of class countFilter (also a data.frame) that contains the molecule identifier and the mean/percent/max/sum/nonmissing count across all samples.

Author(s)

Allison Thompson, Bryan Stanfill

References

Arumugam, Manimozhiyan, et al. "Enterotypes of the human gut microbiome." nature 473.7346 (2011): 174-180.

https://bioinformatics.oxfordjournals.org/content/early/2013/07/15/bioinformatics.btt350.full

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Not run: 
library(mintJansson)
data(rRNA_data)
omicsData <- rRNA_data

#Find mean count of OTUs
mean_lim <- count_based_filter(omicsData, fn="mean")
head(mean_lim)
summary(mean_lim)
plot(mean_lim)

#Find percentage of each OTU
perc_lim <- count_based_filter(omicsData, fn="percent")
head(perc_lim)
summary(perc_lim)
plot(perc_lim)

#Find maximum count of OTUs
max_lim <- count_based_filter(omicsData, fn="max")
head(max_lim)
summary(max_lim)
plot(max_lim)

#Find total count of OTUs
sum_lim <- count_based_filter(omicsData, fn="sum")
head(sum_lim)
summary(sum_lim)
plot(sum_lim)

#Find number of nonmissing OTUs
nonmiss_lim <- count_based_filter(omicsData, fn="nonmiss")
head(nonmiss_lim)
summary(nonmiss_lim)
plot(nonmiss_lim)

#Find order of samples for k/a filtering
ka_lim <- count_based_filter(omicsData, fn="ka")
head(ka_lim)
summary(ka_lim)
plot(ka_lim)

## End(Not run)

pmartR/pmartRseq documentation built on May 25, 2019, 9:20 a.m.