summaryrefslogtreecommitdiff
path: root/topics
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2021-08-11 04:51:10 +0300
committerMuriithi Frederick Muriuki2021-08-11 04:51:10 +0300
commit6a3ee729ffcbe26fecd1b5e1db13bfcf09f4c5e4 (patch)
tree759460508f218dacb78bcf899c76bb1acb584b10 /topics
parent7739f044e3c57a67395ee5daf8d5916e5359b1aa (diff)
downloadgn-gemtext-6a3ee729ffcbe26fecd1b5e1db13bfcf09f4c5e4.tar.gz
Update issue with notes on proof-of-concept explorations
* In the migration over from genenetwork1 to genenetwork3, there is a change in the libraries used, and even in the layout of the code. This necessitates the exploration of some features of the available libraries to get the work done as appropriate. In this commit, there is some detail of the exploratory results, complete with a code snippet to give an idea of what is possible, and what is still pending exploration.
Diffstat (limited to 'topics')
-rw-r--r--topics/gn1-migration-to-gn2/clustering.gmi42
1 files changed, 41 insertions, 1 deletions
diff --git a/topics/gn1-migration-to-gn2/clustering.gmi b/topics/gn1-migration-to-gn2/clustering.gmi
index c4fc59e..03f1313 100644
--- a/topics/gn1-migration-to-gn2/clustering.gmi
+++ b/topics/gn1-migration-to-gn2/clustering.gmi
@@ -50,4 +50,44 @@ I (@fredmanglis) have noticed that the computation of the heatmap data is intert
I think this will be among the first things to separate, as part of moving the computation over to GN3. My initial impression of this, is that the GN3 should handle the computation and GN2 the display.
-Please correct me if I am wrong. \ No newline at end of file
+Please correct me if I am wrong.
+
+
+## 2021-08-11
+
+I have had a look at the Python implementation of Plotly, and tried out a few of the examples to get a feel for the library and its capabilities. I think it is possible to use the library to draw the heatmaps, though I'll need more time to fully grasp how it works, and how I could use it to actually provide some of the features in the clustering heatmaps that do not seem to be out-of-the-box with plotly, e.g. the lines with clustering distance.
+
+It does also seem like the library might provide more complex heatmaps, such as
+
+=> https://plotly.com/python/imshow/#display-an-xarray-image-with-pximshow heatmap of xarray data
+
+which sort of approximates the heatmap example linked in
+
+=> https://github.com/genenetwork/genenetwork3/pull/31#issuecomment-891539359 zsloan's comment
+
+I wrote a simple script to test out the library as shown:
+
+```
+import random
+import plotly.express as px
+
+def generate_random_data(width=10, height=30):
+ return [[random.uniform(0,2) for i in range(0, width)]
+ for j in range(0, height)]
+
+def main():
+ fig = px.imshow(generate_random_data())
+ fig.show()
+
+if __name__ == "__main__":
+ main()
+```
+
+Thankfully, the following python packages seem to already be packaged with guix-bioinformatics:
+
+* python-plotly
+* python-pandas
+* python-xarray
+* python-scipy
+
+The only (seemingly) missing package is `python-pooch`