-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hi !
Thank you so much for building this package, I have issues with:
- There are three legend right now in the bottom, i only want to keep the red green ones.
- I want to make the annotation on the left to disappear.
and my code
`
pdf(paste0(target1_name, "_", target2_name, ".pdf"), width = 6, height = 10)
if (target1_name=="POLR2AphosphoS2"){ target1_name="Pol II S2P"}
if (target2_name=="POLR2AphosphoS2"){ target2_name="Pol II S2P"}
col_t1 <- "#9D343C"
col_t2 <- "#5AAA46"
cluster_colors <- c("#44708b", col_t1, col_t2) # Adjust colors as needed
annotation_min <- min(min(mat_target1_signal), min(mat_target2_signal))
annotation_max <- max(max(mat_target1_signal), max(mat_target2_signal))
lgd <- Legend(at = c("cluster1", "cluster2", "cluster3"),
title = "Clusters",
type = "lines",
legend_gp = gpar(col = cluster_colors))
ht_list = Heatmap(partition, col =cluster_colors,
show_row_names = FALSE, width = unit(5, "mm")) +
EnrichedHeatmap(mat_target1_signal,
column_title = target1_name,
axis_name = axis_name,
col = c("white", col_t1),
top_annotation = HeatmapAnnotation(lines = anno_enriched(
ylim = c(0, annotation_max),
row_title = NULL,
gp = gpar(col = cluster_colors),
axis_param = list(side = "left", facing = "outside")
)
),
# #name = NULL,
row_order = orders,
)+
EnrichedHeatmap(mat_target2_signal,
row_title = NULL,
column_title = target2_name,
axis_name = axis_name,
col = c("white", col_t2),
top_annotation = HeatmapAnnotation(lines = anno_enriched(
ylim = c(0, annotation_max),
gp = gpar(col = cluster_colors),
axis_param = list(side = "right", facing = "outside")
)
),
heatmap_legend_param = list(side = "bottom"),
row_order = orders)
draw(ht_list, heatmap_legend_side = "bottom",split = partition, #annotation_legend_list = list(lgd)
)
dev.off()`
Thank you so much for your help, any advice is highly appreciated!
