neurogenomics / EpiCompare

Comparison, benchmarking & QC of epigenetic datasets
https://doi.org/doi:10.18129/B9.bioc.EpiCompare
13 stars 3 forks source link

percentage overlap plots: improvements #126

Closed bschilder closed 1 year ago

bschilder commented 1 year ago

overlap_heatmap has new arg draw_cellnote. Works for both static and interactive version of the plot.

Now rendered as transparent cells.

94b31f80-69a5-40bc-94b0-a918e5190fda

This functionality is not currently offered within UpSetR so may need to switch packages: https://github.com/hms-dbmi/UpSetR/issues/183

That said, here are workarounds offered by ComplexUpset: https://krassowski.github.io/complex-upset/articles/Examples_R.html#showing-percentages

This has a ton ways to display overlaps including % .

bschilder commented 1 year ago

Actually, you currently can't have it all for heatmaps.

So for now, whendraw_cellnote=TRUE , I'll use heatmaply but avoid usingfill_diag.

check_heatmap_args <- function(draw_cellnote,
                               interact,
                               fill_diag,
                               verbose=TRUE){
  if(isTRUE(draw_cellnote) && isTRUE(interact)){
    check_dep("heatmaply")
    if(!is.null(fill_diag)){
      messager("Warning: fill_diag must =NULL",
               "due to a known bug in the package 'heatmaply'.",v=verbose)
      fill_diag <- NULL
    } 
  }
  return(fill_diag)
}