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

Missing labels in plot_tree #749

Open
ycl6 opened this issue Apr 21, 2017 · 8 comments
Open

Missing labels in plot_tree #749

ycl6 opened this issue Apr 21, 2017 · 8 comments

Comments

@ycl6
Copy link

ycl6 commented Apr 21, 2017

The figure produced by plot_tree is missing many family-level labels although most of the taxa contain family-level assignment. Also the placement of the labels were off for several taxa.

tree

The code I used to produce the plot:

plot_tree(tipg, size = "Abundance", color = "Condition", justify = "yes please", ladderize = "left", title = "By Family", label.tips = "Family") + scale_size_continuous(range = c(1, 5))

And my tax table looks like this:

Taxonomy Table:     [47 taxa by 1 taxonomic ranks]:
       Family
SV0001 "Prevotellaceae"
SV0002 "Bacteroidaceae"
SV0004 "Helicobacteraceae"
SV0005 "Lachnospiraceae"
SV0006 "Bacteroidales_S24-7_group"
SV0010 "Gastranaerophilales_fa"
SV0018 "Alcaligenaceae"
SV0023 "Ruminococcaceae"
SV0024 "Peptostreptococcaceae"
SV0031 "Lactobacillaceae"
SV0042 "Erysipelotrichaceae"
SV0044 "Clostridiales_vadinBB60_group"
SV0079 "Desulfovibrionaceae"
SV0090 "Rikenellaceae"
SV0120 NA
SV0124 "Clostridiaceae_1"
SV0141 "NB1-n_fa"
SV0145 "Peptococcaceae"
SV0190 "Rhodospirillaceae"
SV0235 "Deferribacteraceae"
SV0246 "Defluviitaleaceae"
SV0277 "Christensenellaceae"
SV0282 NA
SV0295 "Family_XIII"
SV0330 "Enterobacteriaceae"
SV0346 "Porphyromonadaceae"
SV0379 "Streptococcaceae"
SV0385 "Thermoanaerobacteraceae"
SV0389 NA
SV0391 "Bacillaceae"
SV0408 "Coriobacteriaceae"
SV0427 "Moraxellaceae"
SV0490 "Unknown_Family"
SV0507 "Corynebacteriaceae"
SV0540 "Aerococcaceae"
SV0563 "Pasteurellaceae"
SV0720 "Mollicutes_RF9_fa"
SV0838 "Enterococcaceae"
SV1124 "Anaeroplasmataceae"
SV1144 "Bifidobacteriaceae"
SV1167 "Micrococcaceae"
SV1177 "Staphylococcaceae"
SV1216 NA
SV1353 NA
SV1430 "Leuconostocaceae"
SV1498 "Veillonellaceae"
SV1509 "Eubacteriaceae"
@ycl6
Copy link
Author

ycl6 commented Apr 23, 2017

I think I figured out why some aren't labelled. When the very fist sample have 0 abundance, the label is not added even though the abundance isn't 0 for other samples.

plot_tree

@jeffkimbrel
Copy link

Yeah, this has been an issue for a while. See #475

@joey711
Copy link
Owner

joey711 commented Apr 23, 2017

@ycl6 you bug-diagnosis is very helpful. I think I have an idea of what this is and how it is happening.

@jeffkimbrel sorry for the long delay. I was aware of this issue, but it was difficult to diagnose and appeared to be arbitrary and hard to reproduce... now I see why... if the first-sample-zero turns out to be the root cause.

@ycl6
Copy link
Author

ycl6 commented Apr 24, 2017

@jeffkimbrel thanks for pointing it out. I wasn't aware it has been reported.

@LiamMacNeil
Copy link

@joey711 Has this bug been resolved? I'm having the same issue but the graphics are excellent and I'm hoping to use it!

Screen Shot 2021-02-24 at 15 04 08

@ycl6
Copy link
Author

ycl6 commented Feb 26, 2021

@LiamMacNeil I did not realise this has not been resolved.
I just make a PR #1445 to fix problems with plot_tree, and hopefully it will help anyone who wish to use the function

@LiamMacNeil
Copy link

@ycl6 Success! All the taxa are now printed, the only occurs when I set justify = TRUE. Thank you!

@ycl6
Copy link
Author

ycl6 commented Mar 2, 2021

Thanks for testing it and your feedback @LiamMacNeil

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

4 participants