Check for Polyphyletic Taxa
phyloseq
object
Taxonomic level to check. Default is Genus
Logical. Return data.frame or list
Data frame or list
Check for polyphyletic taxa in tax_table
. Useful to check this
before aggregating at any level.
Shetty SA (2020). Utilities for microbiome analytics. https://github.com/RIVM-IIV-Microbiome/biomeUtils
library(biomeUtils)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
data("FuentesIliGutData")
polydf <- checkPolyphyletic(FuentesIliGutData)
polydf
#> # A tibble: 6 × 7
#> # Groups: Genus [3]
#> Domain Phylum Class Order Family Genus nfeat…¹
#> <chr> <chr> <chr> <chr> <chr> <chr> <int>
#> 1 Bacteria Firmicutes Clostridia Clostridiales Lachnospiraceae Eubacter… 2
#> 2 Bacteria Firmicutes Clostridia Clostridiales Lachnospiraceae Clostrid… 2
#> 3 Bacteria Firmicutes Clostridia Clostridiales Lachnospiraceae Ruminoco… 2
#> 4 Bacteria Firmicutes Clostridia Clostridiales Ruminococcaceae Ruminoco… 2
#> 5 Bacteria Firmicutes Clostridia Clostridiales Eubacteriaceae Eubacter… 2
#> 6 Bacteria Firmicutes Clostridia Clostridiales Ruminococcaceae Clostrid… 2
#> # … with abbreviated variable name ¹nfeatures