aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2021-07-22 12:11:18 +0300
committerMuriithi Frederick Muriuki2021-07-22 12:11:18 +0300
commit89a4a7dad91be22fe617e0b42cffa1b08395eb82 (patch)
tree8b51d35fe364fc7eff8080ae6427b7a4401b1349 /gn3/computations
parent6561bc76e14e7846beb90442d3fb562a2e0e4fe8 (diff)
downloadgenenetwork3-89a4a7dad91be22fe617e0b42cffa1b08395eb82.tar.gz
Add docstring
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Add docstring to the function, useful for generating automated developer documentation. We also surround the guard functions with some notification comments, to mark possible future places where change might be done.
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/slink.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gn3/computations/slink.py b/gn3/computations/slink.py
index 704a0f4..dc71815 100644
--- a/gn3/computations/slink.py
+++ b/gn3/computations/slink.py
@@ -20,6 +20,13 @@ def raise_valueerror_if_lists_empty(lists):
raise ValueError("List/Tuple should NOT be empty!")
def nearest(lists, i, j):
+ """Computes some form of distance.
+This is 'copied' over from genenetwork1, from https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/heatmap/slink.py#L42-L64.
+
+This description should be updated once the form/type of 'distance' identified."""
+
+ #### Guard Functions: Should we do this a different way? ####
raise_valueerror_if_data_is_not_lists_or_tuples(lists)
raise_valueerror_if_lists_empty(lists)
+ #### END: Guard Functions ####
return None