aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-10-29 04:55:30 +0300
committerFrederick Muriuki Muriithi2021-10-29 04:55:30 +0300
commit4c73d70d6d844bf2fa3358c71b9e28daff51e69c (patch)
treed029c937f0d6316ef541c5aa9d0c7973c3390e41
parent5fd3bfe587144a61c66ebf730c4818071b1a9661 (diff)
downloadgenenetwork3-4c73d70d6d844bf2fa3358c71b9e28daff51e69c.tar.gz
Move the function to computations module
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * The function `batch_computed_tissue_correlation` is a pure computations function with no expressions accessing the database, as far as I can tell, therefore, this commit moves the function over to the gn3.computations.partial_correlations module that holds the pure computation functions.
-rw-r--r--gn3/computations/partial_correlations.py8
-rw-r--r--gn3/db/correlations.py8
2 files changed, 8 insertions, 8 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py
index 1fb0ccc..b3de31c 100644
--- a/gn3/computations/partial_correlations.py
+++ b/gn3/computations/partial_correlations.py
@@ -122,3 +122,11 @@ def find_identical_traits(
(primary_name,) + control_names), {}).items()
if len(item[1]) > 1),
tuple()))
+
+def batch_computed_tissue_correlation(
+ trait_value: str, symbol_value_dict: dict,
+ method: str = "pearson") -> Tuple[dict, dict]:
+ """
+ `web.webqtl.correlation.correlationFunction.batchCalTissueCorr`"""
+ raise Exception("Not implemented!")
+ return ({}, {})
diff --git a/gn3/db/correlations.py b/gn3/db/correlations.py
index 54d3079..f43b8a5 100644
--- a/gn3/db/correlations.py
+++ b/gn3/db/correlations.py
@@ -281,14 +281,6 @@ def fetch_gene_symbol_tissue_value_dict_for_trait(
return fetch_gene_symbol_tissue_value_dict(xref_info[0], xref_info[2], conn)
return {}
-def batch_computed_tissue_correlation(
- trait_value: str, symbol_value_dict: dict,
- method: str = "pearson") -> Tuple[dict, dict]:
- """
- `web.webqtl.correlation.correlationFunction.batchCalTissueCorr`"""
- raise Exception("Not implemented!")
- return ({}, {})
-
def correlations_of_all_tissue_traits(
trait_symbol: str, probeset_freeze_id: int,
method: str, conn: Any) -> Tuple[dict, dict]: