zhengxwen / SNPRelate

R package: parallel computing toolset for relatedness and principal component analysis of SNP data (Development version only)
http://www.bioconductor.org/packages/SNPRelate
98 stars 25 forks source link

Labeling on HapMap Phase II #87

Closed Asrix closed 3 years ago

Asrix commented 3 years ago

Hi,

With snpgdsDrawTree is there any way to label the individuals? I would like to have the sample ids appear on the plot so I can tell which individuals it thinks are closely related.

Thanks!

zhengxwen commented 3 years ago

Yes. If you have a chance to take a look at the source code of snpgdsDrawTree(), the input of obj$dendrogram is a R dendrogram object. There are lots of examples to show how to customize the plot. .e.g., http://www.sthda.com/english/wiki/beautiful-dendrogram-visualizations-in-r-5-must-known-methods-unsupervised-machine-learning

Asrix commented 3 years ago

Thanks! I had tried looking at the plot documentation without much success.