Browse code

color palette now done via colorspace

Federico Marini authored on 01/07/2020 21:01:30
Showing 4 changed files

... ...
@@ -22,6 +22,7 @@ Depends:
22 22
 Imports:
23 23
     AnnotationDbi,
24 24
     bs4Dash,
25
+    colorspace,
25 26
     ComplexHeatmap,
26 27
     dendextend,
27 28
     DESeq2,
... ...
@@ -70,7 +71,7 @@ Encoding: UTF-8
70 71
 VignetteBuilder: knitr
71 72
 URL: https://github.com/federicomarini/GeneTonic
72 73
 BugReports: https://github.com/federicomarini/GeneTonic/issues
73
-RoxygenNote: 7.1.0
74
+RoxygenNote: 7.1.1
74 75
 Roxygen: list(markdown = TRUE)
75 76
 biocViews:
76 77
     GUI, GeneExpression, Software, Transcription, Transcriptomics, Visualization,
... ...
@@ -89,6 +89,7 @@ importFrom(bs4Dash,bs4ValueBox)
89 89
 importFrom(bs4Dash,bs4ValueBoxOutput)
90 90
 importFrom(bs4Dash,renderbs4InfoBox)
91 91
 importFrom(bs4Dash,renderbs4ValueBox)
92
+importFrom(colorspace,rainbow_hcl)
92 93
 importFrom(dendextend,branches_attr_by_clusters)
93 94
 importFrom(dendextend,set)
94 95
 importFrom(dplyr,"%>%")
... ...
@@ -12,6 +12,7 @@
12 12
 #' bs4SidebarMenuItem bs4TabItem bs4TabItems bs4ValueBox
13 13
 #' bs4ValueBoxOutput renderbs4InfoBox renderbs4ValueBox
14 14
 #' bs4TabPanel bs4TabCard
15
+#' @importFrom colorspace rainbow_hcl
15 16
 #' @importFrom ComplexHeatmap Heatmap HeatmapAnnotation draw
16 17
 #' @importFrom dendextend branches_attr_by_clusters set
17 18
 #' @importFrom DESeq2 vst counts estimateSizeFactors normalizationFactors sizeFactors
... ...
@@ -1151,6 +1151,7 @@ GeneTonic <- function(dds,
1151 1151
     
1152 1152
     output$distill_graph <- renderVisNetwork({
1153 1153
       ig <- reactive_values$distillat()$distilled_em
1154
+      # TODO: define color palette
1154 1155
       colpal <- colorspace::rainbow_hcl(length(unique(V(ig)$color)))[V(ig)$color]
1155 1156
       V(ig)$color.background <- scales::alpha(colpal, alpha = 0.8)
1156 1157
       V(ig)$color.highlight <- scales::alpha(colpal, alpha = 1)