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_cladogram(): Mismatch between marker legend and plot labels #42

Closed
sn0001 opened this issue Jul 8, 2021 · 6 comments
Closed

plot_cladogram(): Mismatch between marker legend and plot labels #42

sn0001 opened this issue Jul 8, 2021 · 6 comments
Assignees

Comments

@sn0001
Copy link

sn0001 commented Jul 8, 2021

Thank you for this great package! Trying plot_cladogram() with many makers, I noticed that the labels of the marker legend do not agree with those in the plot. Specifically, this happens when there are more markers than latin letters and double letter combinations are used.

Minimum reproducible example:

data("spontaneous_colitis")
mm_lefse <- run_lefse(
    kostic_crc,
    wilcoxon_cutoff = 0.01,
    class = "DIAGNOSIS",
    kw_cutoff = 0.01,
    multicls_strat = TRUE,
    lda_cutoff = 3
)
plot_cladogram(mm_lefse, color = c("blue", "red"), marker_legend_param = list(ncol = 2))

In the upper left of the cladogram, you will notice a red "Tumor"-related group with letter codes aa and j. The latter do not belong to "Tumor" markers.

@yiluheihei yiluheihei self-assigned this Sep 1, 2021
@yiluheihei
Copy link
Owner

@sn0001 I'm very sorry for the delay reply. The example data spontaneous_colitis was from galaxy lefse demo, and the data has been summarized to a taxonomic level (e.g. seprated by |). In order to test the accuracy and reliability of the lefse algorithm implemented in microbiomeMarker, this data is only used for test the accuracy of lefse results.

In the current version of microbiomeMarker, the analysis is begin from the taxa table rather than the summarized taxa table, which means that summarized data like spontaneous_colitis is not supported in the current release version. I'm very sorry for the confusion cased by this data, and maybe I should remove this example data.

@sn0001
Copy link
Author

sn0001 commented Nov 23, 2021

@yiluheihei Thank you for your reply. I am running into the described error with my own data, too. How do I have to prepare my phyloseq data for microbiomeMarker to avoid the marker legend mismatch error?

@yiluheihei
Copy link
Owner

Could you provide a reproducible example?

@sn0001
Copy link
Author

sn0001 commented Nov 24, 2021

@yiluheihei Of course! Please unzip the attached phyloseq object data and use them along with the code below:

library(microbiomeMarker)
set.seed(123)
ps <- readRDS("phyloseq.rds")
mm <- run_lefse(ps, group = "Grouping")
plot_cladogram(mm, color = c("blue", "green", "red"))

The result should look as in the screenshot below. Note that marker “ag” belongs to Group_8 according to the cladogram, but to Group_1 according to the legend.

screenshot

@yiluheihei
Copy link
Owner

@sn0001 The issue was fixed. You can reinstall the package from github and try again. Thanks your feedback again.

@sn0001
Copy link
Author

sn0001 commented Nov 27, 2021

@yiluheihei Thanks a lot!

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