yiluheihei / microbiomeMarker

R package for microbiome biomarker discovery
https://yiluheihei.github.io/microbiomeMarker
GNU General Public License v3.0
171 stars 40 forks source link

plot_cladogram() #59

Open marwa38 opened 2 years ago

marwa38 commented 2 years ago

good morning :) how to solve the issue of the overlapping of the labels in the cladogram? I can't find any option to change the place of the label on the cladogram itself to be on different levels let's say so they don't overlap. Changing the font of the label is not enough plot_cladogram(lefse, color = c("blue", "red"), clade_label_font_size = 3) image Thanks

marwa38 commented 2 years ago

I suggest having an option (parameter) in run_lefse function to control the labels (in form of letters) separately than the words by changing the available options in clade_label_font_size

so we can change the size of the for example p_Firmicutes without jeopardizing the size of the ae as a label letter (as shown in figure above) where we can make the word label small enough to not overlap (and where the audience can zoom in for better visualisation in case needed while keeping the letters clear to see) .. hope I clarified my point enough

yiluheihei commented 2 years ago

Thanks for your interested in microbiomeMarker. Maybe clade_label_font_size should upport a vector to set the font size of clade label seperately, or if it is a constant all the clade lables will in the same font size.

xzsun commented 2 years ago

image 我设置only_marker=FALSE时,图形可以出来,但是好多空的,不好看,于是我设置了only_marker=TRUE,这时候就报错了,如下: image

可是我用其他的数据数据分组时这就是可以的,请问如何解决,谢谢! image

SouravDutta79 commented 1 year ago

Hi @marwa38, How did you color the nodes? Some labels are there in the Cladogram (like gammaproteobacteria). But in my case everything is outside the cladogram. Please take a look!

feces_only markers

I used these codes - lot_cladogram(mm_lefse, color = c(WT = blue, S8 = brown), only_marker = T, alpha = 0.6, clade_label_font_size = 3) + theme(plot.margin = margin(0, 0, 0, 0))

Can you share your run_lefse code with me?

marwa38 commented 1 year ago

here is my code plot_cladogram(lefse, color = c("blue", "red"), clade_label_font_size = 3) Not sure what argument you did that lead to your figure. Maybe try to remove some of the arguments and see what you will get?