summaryrefslogtreecommitdiff
path: root/topics
diff options
context:
space:
mode:
Diffstat (limited to 'topics')
-rw-r--r--topics/gn1-migration-to-gn2/clustering.gmi33
1 files changed, 33 insertions, 0 deletions
diff --git a/topics/gn1-migration-to-gn2/clustering.gmi b/topics/gn1-migration-to-gn2/clustering.gmi
index f98ad1d..fc38b01 100644
--- a/topics/gn1-migration-to-gn2/clustering.gmi
+++ b/topics/gn1-migration-to-gn2/clustering.gmi
@@ -99,3 +99,36 @@ python-pooch is in guix as of commit 211c933 in master from this March:
=> https://guix.gnu.org/packages/python-pooch-1.3.0/ python-pooch package listing
=> https://issues.guix.gnu.org/47022 python-pooch patch thread
+
+## 2021-08-12
+
+When the "Single Spectrum" colour scheme is selected, the heatmap's "colour-scale" in genenetwork1 is a single spectrum that flows from Blue, through green, to red. This one is easy to reproduce somewhat by setting the colour scale with something like:
+
+```
+fig.update_coloraxes(colorscale=[
+ [0.0, '#0000FF'],
+ [0.5, '#00FF00'],
+ [1.0, '#FF0000']])
+```
+
+When the "Blue + Red" colour scheme is selected, the heatmap's "colour-scale" in genenetwork1 is split into 2 separate colour scales depending on whether the data value corresponds to one of:
+
+* C57BL/6J +
+* DBA/2J +
+
+When the "Grey + Blue + Red" colour scheme is selected, the heatmap's "colour-scale" in genenetwork1 goes from a dark-grey at 0 to a light-grey at 0.5, before splitting into 2 separate colour scales for values greater than 0.5, depending on whether the data value corresponds to one of:
+
+* C57BL/6J +
+* DBA/2J +
+
+I (@fredmanglis) have not yet figured out how to represent these more complex splits on the Plotly heatmaps, but I have a suspicion this might be achieved if there is a way to label the data as it goes into the `px.imshow(...)` call.
+
+Maybe look into using the
+
+=> https://plotly.com/python/creating-and-updating-figures/#conditionally-updating-traces conditional trace update
+
+feature to set up the colours as appropriate, when different colour-schemes are selected. Failing that, have a look at the
+
+=> https://plotly.com/python/colorscales/ colour scales documentation
+=> https://plotly.com/python/plotly-fundamentals/ plotly fundamentals page
+=> https://plotly.com/python/categorical-axes/ categorical axes