jokergoo / ComplexHeatmap

Make Complex Heatmaps
https://jokergoo.github.io/ComplexHeatmap-reference/book/
Other
1.32k stars 228 forks source link

Rectangles and triangles in Oncoprint #1080

Open albertop210 opened 1 year ago

albertop210 commented 1 year ago

Hi, since I can't find this option in the vignette, would it be possible to color 'multi-hit' rectangles with 2 triangles of different colors, each one representing the color of the respective type of mutation?

For example: sample1 sample2 sample3 gene1 snv; snv;indel; snv; gene2 indel; snv; snv;indel;

I would like to represent 'snv' and 'indel' with 2 different colored rectangles, while the co-presence of 'snv AND indel' as 2 triangles of the respective colors, composing a rectangle in the Oncoprint. Is is possible in your opinion? How should I modify the code?

Thanks in advance,

Alberto

jokergoo commented 1 year ago

Ohh, then maybe you can assign a new mutation code for the case of both snv and indel such as "snv+indel", and design a graph for that:


alter_fun = list(
    snv = function...
    indel = function...
    "snv+indel" = function...
)