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

Sorting stacked barplot based on abundance values #28

Closed
nelli-vardazaryan opened this issue Feb 23, 2024 · 1 comment
Closed

Sorting stacked barplot based on abundance values #28

nelli-vardazaryan opened this issue Feb 23, 2024 · 1 comment

Comments

@nelli-vardazaryan
Copy link

nelli-vardazaryan commented Feb 23, 2024

Hey,

I am using fantaxtic to create a stacked barplot of relative abundances for each of my samples; however, I am having difficulties controlling the order of each block within each sample. I would like to have these blocks sorted by their abundances in descending or ascending order for easier viewing.

I am using the following code:

top_nested <- nested_top_taxa(ps.rel,
                              top_tax_level = "Phylum",
                              nested_tax_level = "Genus",
                              n_top_taxa = 15, 
                              n_nested_taxa = 15)

plot_nested_bar(ps_obj = top_nested$ps_obj,
                top_level = "Phylum",
                nested_level = "Genus")
Screenshot 2024-02-23 at 13 42 01

Is there a way to change this default behavior?

@gmteunisse
Copy link
Owner

gmteunisse commented Feb 25, 2024 via email

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

2 participants