all_clades: Extract all clades present in the lineages

View source: R/extract.R

all_cladesR Documentation

Extract all clades present in the lineages

Description

Extract all clades present in the lineages

Usage

all_clades(lineage, simplify = TRUE)

Arguments

lineage

string. Vector of lineages.

simplify

logical. Should the output be a vector or a dataframe?

Details

If a clade correspond to different ranks (e.g. Actinobacteria is both a phylum and a clade), it will be displayed only one time when simplify is set to TRUE. It is also the case for different clades with same name and same rank when simplify is set to FALSE.

Value

The clades present in the lineage. Vector of ordered strings or data.frame.

Examples

lineage1 <- "k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae"
lineage2 <- "k__Bacteria|p__Firmicutes|c__Clostridia"
lineage3 <- "k__Bacteria|p__Actinobacteria|c__Actinobacteria"
all_clades(c(lineage1, lineage2, lineage3))
all_clades(c(lineage1, lineage2, lineage3), simplify = FALSE)

yatah documentation built on Nov. 13, 2022, 1:07 a.m.