I'm encountering an issue while attempting to generate a hierarchical clustering dendrogram in R. My objective is to color the branches of the dendrogram based on the sample types associated with each sample. However, despite my efforts, all branches appear in red color only.
Despite defining colors for each sample type and creating a color vector accordingly, the resulting dendrogram plot displays all branches in red color. I've ensured that the sample_types variable contains the correct values and that the col_vector is properly assigned. However, the issue persists.
I would appreciate any insights or suggestions on how to correctly color the branches of the dendrogram based on the sample types.
Thank you for your assistance!