Is there a way to customize what observations are plotted in ComplexHeatmap?
What is fed into ComplexHeatmap is what it outputs! So if one of your genes has a Missense_Mutation as well as a Frame_Shift_Del and you would like to plot its value, of course you will have a category and color that is different than those of Missense_Mutation or Frame_Shift_Del, that is only natural.
What you can do is to create additional variables like your_gene_Missense_Mutation or your_gene_Frame_Shift_Del each with 0 or 1 to indicate if a particular mutation type is present or not for a particular gene (you can think of it like one-hot-encoding). With a lot of different levels, the resulting heatmap could be difficult to interpret though.
Another simpler alternative would be a using a &quot;universal label&quot; if your gene has multiple mutations. Basically if the cell contains a ;, its value will be changed to something like mixed_mutation_status and instead of multiple &quot;mutation_type_1; mutation_type_2; ... like categories, you will just have one mixed_mutation_status on top of Missense_Mutation, Frame_Shift_Del, ...