This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How do I add sample annotations to this data?

I was able to generate this dot plot using ggplot2 from scratch. I would like to add sample annotations (similar to the ones you'd see in heat maps where they annotate clusters). I have another data frame containing sample IDs and their respective subtypes. Pseudocode would be appreciated.

enter image description here

r data visualization ggplot2

maybe try a simple facet_grid(~group,scales="free",space="free") where group is the column in you dataframe containing the sample annotation. Without any example it will be difficult to help you.

So this absolutely serves the function I wanted to achieve, Thank you so much for that. Can we make it colorful though :P Also, is it possible to wrap text, for the one that seems to be cut off?

enter image description here

Please check this post by Yun to see how it can be made colorful annotation layer.

0 answers

No answers yet.

Log in to answer this question.