filter_results: Filter differential test results for specific taxa

Description Usage Arguments Value Examples

View source: R/diff_tests.R

Description

Filter differential rest results by removing taxa. For example, a genus level table obtained using tax_glom() function will put all unknown genera under a family as Genus = NA under that family. But this is a Frankenstein genus that could potentially contain multiple genera. Thus it would be a good idea to remove such genera from the results table, and only report those with Genus != NA.

Usage

1
filter_results(results, rank)

Arguments

results

Results from test_differential_abundance_DESeq2(), or test_differential_abundance_Wilcoxon() or test_differential_prevalence().

rank

Name of taxonomic rank to be tested for any NA values.

Value

Results object with same variables as in the input results object, except that the table variable is now free of any entries that have NA and the rank level.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
res <- test_differential_prevalence(physeq, group = "Diet")

# Remove Genus=NA because it is a chimeric genus.
res <- filter_results(res, "Genus")

# Now format them
hits <- format_hits(res)

## End(Not run)

TBrach/MicrobiomeX documentation built on April 19, 2018, 12:25 a.m.