-
Notifications
You must be signed in to change notification settings - Fork 3
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
Change X axis order with fantaxtic_bar #16
Comments
Hi Pau, Thanks for using fantaxtic! In If you prefer to use Let me know if this has resolved your issue. |
Thank you, I'm really enjoying this new function. My issue now is I need to specify colors for each order that is graphed so I can compare across samples. I tried to do this but it just used its own default colors: plot_nested_bar(ps_obj = top_asv$ps_obj, top_level = "Phylum", |
Great! Re the colours: could you open a new issue for that and post a reproducible example (e.g. with GlobalPatterns?).
…________________________________
From: Pau Fiori ***@***.***>
Sent: Sunday, April 16, 2023 10:27:18 PM
To: gmteunisse/fantaxtic ***@***.***>
Cc: gmteunisse ***@***.***>; Comment ***@***.***>
Subject: Re: [gmteunisse/fantaxtic] Change X axis order with fantaxtic_bar (Issue #16)
Thank you, I'm really enjoying this new function. My issue now is I need to specify colors for each order that is graphed so I can compare across samples. I tried to do this but it just used its own default colors:
plot_nested_bar(ps_obj = top_asv$ps_obj, top_level = "Phylum",
nested_level = "Family",
palette=c(Frankiales = "paleturquoise1",
Micrococcales = "turquoise2",
Microtrichales = "turquoise3",
Bacteroidales = "gold",
Cytophagales = "goldenrod2",
Flavobacteriales = "goldenrod3",
Burkholderiales = "mistyrose",
Enterobacterales = "pink",
Pseudomonadales = "palevioletred1",
Rhizobiales = "palevioletred3",
Sphingmonadales = "maroon1",
Rhodobacterales = "violetred4",
Xanthomonadales = "palevioletred4",
Verrucomicrobiota = "black"))
—
Reply to this email directly, view it on GitHub<#16 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHBWS3S3LGDSBS3U553BMMTXBRI2NANCNFSM6AAAAAAW7WWTO4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hi, I am trying to change the X axis order on my fantaxtic_bar plot - I'm sad to see that was deprecated, by the way! It is my favorite package for microbiome data.
`ps_norm <- transform_sample_counts(ps, function(x) x / sum(x) )
family <- tax_glom(ps, taxrank = "Family")
top15 <- get_top_taxa(family, 15, relative = TRUE, discard_other = FALSE, other_label = "Other")
top15 <- name_taxa(top15, label = "", species = F, other_label = "Other")
sample_data(top15)$Month = factor(sample_data(top15)$Month, levels = c("20-Nov","21-Apr","21-May","21-Jul", "22-Feb", "22-Mar", "22-Apr"))
sample_names(top15) <- sample_data(top15)$Month
fantaxtic_bar(top15, color_by = "Family", label_by = "Family", facet_by = NULL, grid_by = NULL)`
This didn't change the X axis order. Any suggestions? Thank you
The text was updated successfully, but these errors were encountered: