Replies: 3 comments 1 reply
-
|
If you can share a piece of your data, I'd like to help. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you! Below is sample data in pipe delimited format. First row is header. Number of Process - 1 .. N Date | Process | SubProcess | Control | Result Would like to plot above data as below with legend. |
Beta Was this translation helpful? Give feedback.
-
|
you need to construct a matrix where rows are date and columns are combination of "process" mat = matrix(
sample(c("No control", "Mandatory", "Optional", ""), size = 100, p = c(1, 1, 1, 4), replace = TRUE),
nrow = 10, ncol = 10)
rownames(mat) = paste0("2022-1-", 1:10)
colnames(mat) = c(paste0("A", 1:5), paste0("B", 1:5))
matThen in the heatmap, "process" and "subprocess" can be two column annotations. control_col = c("Mandatory" = "red", "Optional" = "yellow")
Heatmap(mat, show_heatmap_legend = FALSE,
rect_gp = gpar(type = "none"),
top_annotation = HeatmapAnnotation(process = c(rep("A", 5), rep("B", 5)),
subprocess = c(1:5, 1:5),
col = list(subprocess = c("1" = "red", "2" = "orange", "3" = "blue", "4" = "green", "5" = "purple"))
),
cell_fun = function(j, i, x, y, w, h, f) {
grid.rect(x, y, w, h, gp = gpar(fill = "grey", col = "black"))
if(mat[i, j] %in% names(control_col)) {
grid.points(x, y, pch = 16, gp = gpar(col = control_col[mat[i, j]]))
}
}) |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all I want to say that am Impressed by ComplexHeatmap/Oncoprint visualizations and I would like to take this inspiration and apply to non-Medical use case. For ex., I have lot of data processing jobs that runs on different schedules and goes thru set of control checks. I want to produce a visual to show the jobs, processes and their statuses in below format. My existing application is developed on React JS/Java. What library can I use to yield similar visual results. Any help or direction is much appreciated!!
Below is how I intent to replace the values
Patient ID - Job ID
Metastatic site - Run Instance (1, 2, 3 etc.,)
Gene Panel - Process Name
Genetic Alterations - Control checks
Beta Was this translation helpful? Give feedback.
All reactions