Check for Polyphyletic Taxa

Arguments

x

phyloseq object

taxa_level

Taxonomic level to check. Default is Genus

return_df

Logical. Return data.frame or list

Value

Data frame or list

Details

Check for polyphyletic taxa in tax_table. Useful to check this before aggregating at any level.

References

Shetty SA (2020). Utilities for microbiome analytics. https://github.com/RIVM-IIV-Microbiome/biomeUtils

Author

Sudarshan A. Shetty

Examples

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