So right now my observations in the dataset I've processed is stored as sample identifier columns and gene rows: an example of this would be for sample 1 and gene TRIM21 the observation is Missense Mutation;Frame Shift Deletion. I'm having issues separating the two alterations and instead of being able to show the gene in the sample having 2 different alterations, I end up having to generate a new colour classification (being that the gene in the specific sample exhibits specifically both a missense mutation and a frame shift deletion instead of being able to represent the observation with just colours and missense and frame shift deletion colours alone). Here is an a screenshot of what my matrix looks like:
As an example here is some test code generating the test plot:
library(ComplexHeatmap)
test_labels <- c("Missense_Mutation", "Splice_Site", "Frame_Shift_Del",
"Splice_Region","Missense_Mutation;Splice_Site", "Splice_Site;Frame_Shift_Del",
"Splice_Site;Missense_Mutation", "Frame_Shift_Del;Splice_Site")
plot <- Heatmap(test, row_names_side = "left",
row_names_gp = gpar(cex = 0.7),
column_names_gp = gpar(cex = 0.7),
heatmap_legend_param = list(title = "Alterations",
at = test_labels, labels = test_labels), show_heatmap_legend = TRUE)
plot
I've attached a screenshot of my actual plot and as you will be able to see, this ends up creating multiple different classifications: