aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2021-08-27 15:51:27 +0300
committerMuriithi Frederick Muriuki2021-08-27 15:51:27 +0300
commit28fde00ee2835d404157652548a4265be3accede (patch)
tree1ceeb9ea554dce4d3f6006a2138b9b6c3d1f074f
parent1a3901b174d00af8fa7f5ae78b810de66024b5ab (diff)
downloadgenenetwork3-28fde00ee2835d404157652548a4265be3accede.tar.gz
Provide intermediate data in final results
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Seeing as not every requirement/feature has been migrated over at this time, this commit just provides all the intermediate data representations in the final return of the function for later use down the line.
-rw-r--r--gn3/computations/heatmap.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/gn3/computations/heatmap.py b/gn3/computations/heatmap.py
index 2f92048..3e96ed2 100644
--- a/gn3/computations/heatmap.py
+++ b/gn3/computations/heatmap.py
@@ -149,22 +149,22 @@ def heatmap_data(formd, search_result, conn: Any):
def __retrieve_traitlist_and_datalist(threshold, fullname):
trait = retrieve_trait_info(threshold, fullname, conn)
- return (
- trait,
- export_trait_data(retrieve_trait_data(trait, conn), strainlist))
+ return (trait, retrieve_trait_data(trait, conn))
traits_details = [
__retrieve_traitlist_and_datalist(threshold, fullname)
for fullname in search_result]
traits_list = tuple(x[0] for x in traits_details)
- traits_data_list = tuple(x[1] for x in traits_details)
+ traits_data_list = [x[1] for x in traits_details]
+ exported_traits_data_list = tuple(
+ export_trait_data(td, strainlist) for x in traits_data_list)
return {
"target_description_checked": formd.formdata.getvalue(
"targetDescriptionCheck", ""),
"cluster_checked": cluster_checked,
"slink_data": (
- slink(cluster_traits(traits_data_list))
+ slink(cluster_traits(exported_traits_data_list))
if cluster_checked else False),
"sessionfile": formd.formdata.getvalue("session"),
"genotype": genotype,
@@ -173,7 +173,8 @@ def heatmap_data(formd, search_result, conn: Any):
"ppolar": formd.ppolar,
"mpolar":formd.mpolar,
"traits_list": traits_list,
- "traits_data_list": traits_data_list
+ "traits_data_list": traits_data_list,
+ "exported_traits_data_list": exported_traits_data_list
}
def compute_heatmap_order(