trim_rank | R Documentation |
Trim lineages until a specified rank
trim_rank(lineage, rank = yatah::all_ranks, same = TRUE)
lineage |
string. Vector of lineages. |
rank |
string. One of |
same |
logical. Does the lineage have the same depth? Default to |
Returns NA
if a lineage is not as deep as the specified rank.
The trimmed lineages. Depth could be different among them.
lineage1 <- "k__Bacteria|p__Verrucomicrobia|c__Verrucomicrobiae"
lineage2 <- "k__Bacteria|p__Firmicutes|c__Clostridia"
trim_rank(c(lineage1, lineage2), rank = "phylum")
trim_rank(c(lineage1, lineage2), rank = "genus")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.