SydneyBioX / CiteFuse

CiteFuse:
https://sydneybiox.github.io/CiteFuse/index.html
26 stars 5 forks source link

visImportance improvements #14

Open johnyaku opened 2 years ago

johnyaku commented 2 years ago

The boxplot option for visImportance() constructs a ggplot object (g) in lines 191~203 of importanceADT.R, which is then printed on line 204. The function would be more flexible if it returned g rather than printing it. This would allow the user to add their own themes, labels, titles, etc via the + operator provided by ggplot and then print it. (Actually, RStudio will print it to the Plots panel automatically and Rmarkdown documents will print plots by default, but calling print() in other contexts is not too painful.) As it is, the text for the ADT names tends to overlap if there are a large number of ADT probes, which would not be a problem if I could adjust the font size, for example. Thanks for a great package :)

johnyaku commented 2 years ago

... and in a similar vein it would be helpful to add the dot-dot-dot operator (...) to the function signature as follows:

visImportance <- function(
      sce,
     plot = c("boxplot", "heatmap"),
     altExp_name = "ADT",
     exprs_value = "logcounts",
     ...
)

and then pass this into the pheatmap call like this ...

pheatmap::pheatmap(
  corMat_adt,
  clustering_method = "ward.D2",
  annotation_col = anno_col,
  breaks = seq(-0.8, 0.8, 1.6/100),
   ...
    )

... so that users can pass through additional tweaks to pheatmap, such as legend = FALSE or fontsize = 6 etc.