You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if there is a way to use rank_names after the glomming of a phy_tree object in phyloseq. I assume that glomming on phylogeny using tip_glom would be the harder case, but if you consider this tax_glom example:
# agglomerate by rank (taxonomy)ps_genus<- tax_glom(ps, "Genus", NArm=TRUE)
# after glomming, only taxa_names -> Otu000... can be used as label, not genus or other ranks# this is fine
plot_tree(ps_genus, "treeonly", label.tips="taxa_names", text.size=3)
# this not
plot_tree(ps_genus, "treeonly", label.tips="Genus", text.size=3)
plot_tree(ps_genus, "treeonly", label.tips="Class", text.size=3)
Don't know how to automatically pick scale for object of type taxonomyTable. Defaulting to continuous.Error in as(x, "matrix")[i, j, drop = FALSE] : incorrect number of dimensions# check entries of ps-object and of taxonomy tableps_genustax_table(ps_genus)
So the number of entries for taxonomy and tree tips correspond, but (in my data) "Genus" contains multiple NAs. I also tested with "Class", which contains no NAs, but duplicated entries.
Is there a way around to display a taxonomic rank of the leaves after using a *_glom function?
Thanks!
The text was updated successfully, but these errors were encountered:
The way I have been accomplishing this in my own work is a custom function that adds a taxonomic pseudo-rank called something like "lowestTaxonomy". Often in summary graphics this is the label that you want, as the classification precision for different sequences can vary widely across different ranks, but you'd still like to know, for example, what the Family classification was, even if Genus and Species are missing.
I'll think about how to support something like this in the future, and leave this open for now...
joey711
changed the title
using rank_names for label.tips after tax_glom or tip_glom?
Informative taxa labels for plots, even when some ranks are NA
Feb 17, 2019
Hello everyone,
I was wondering if there is a way to use
rank_names
after the glomming of a phy_tree object in phyloseq. I assume that glomming on phylogeny usingtip_glom
would be the harder case, but if you consider thistax_glom
example:So the number of entries for taxonomy and tree tips correspond, but (in my data) "Genus" contains multiple NAs. I also tested with "Class", which contains no NAs, but duplicated entries.
Is there a way around to display a taxonomic rank of the leaves after using a
*_glom
function?Thanks!
The text was updated successfully, but these errors were encountered: