Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_tree and taxonomy #1758

Open
antoine4ucsd opened this issue Jun 15, 2024 · 0 comments
Open

plot_tree and taxonomy #1758

antoine4ucsd opened this issue Jun 15, 2024 · 0 comments

Comments

@antoine4ucsd
Copy link

Hello
First thank you for this impressive set of tools
I have a set of samples from different tissues and different individuals to analyze
my phyloseq object looks like that

phyloseq-class experiment-level object
otu_table()   OTU Table:         [ 811 taxa and 111 samples ]
sample_data() Sample Data:       [ 111 samples by 145 sample variables ]
tax_table()   Taxonomy Table:    [ 811 taxa by 7 taxonomic ranks ]
phy_tree()    Phylogenetic Tree: [ 811 tips and 810 internal nodes ]

I would like to plot a phylogenetic tree so I tried the following


genus <- tax_glom(data, taxrank="Genus")
TopNOTUs <- names(sort(taxa_sums(genus), TRUE)[1:100])
tree <- prune_taxa(TopNOTUs, genus)
tree

plot_tree(tree,ladderize="left", nodelabf=nodeplotblank, color="Phylum", 
                label.tips="Genus", text.size=2, base.spacing=0.05, size="abundance") +             
        scale_size_continuous(range = c(0.1, 5)) +
        theme(legend.title = element_text(size = 8), legend.text = element_text(size = 8))


but I was expecting the taxa from the same phylum to be more closely related than taxa from other phylum.
this is probably obvious but I don't get what's wrong.
any chance you can help with that?

image

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant