aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-11-01 10:52:13 +0300
committerFrederick Muriuki Muriithi2021-11-01 10:52:13 +0300
commit1ab86d17f49927aab58fa96d776a600ad8fd07df (patch)
tree8202e27782eb41c026fe6af9c957ee5f56728c5d
parent05740a60d6616f28751f96ca30adeb524f4369ad (diff)
downloadgenenetwork3-1ab86d17f49927aab58fa96d776a600ad8fd07df.tar.gz
Stub `determine_partials`
Issue: * Stub out `determine_partials` which is a migration of `web.webqtl.correlation.correlationFunction.determinePartialsByR` in GN1. The function in GN1 has R code from line 188 to line 344. This will need to be converted over to Python. This function will also need tests.
-rw-r--r--gn3/computations/partial_correlations.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py
index 1a6868a..fb372a9 100644
--- a/gn3/computations/partial_correlations.py
+++ b/gn3/computations/partial_correlations.py
@@ -196,6 +196,22 @@ def good_dataset_samples_indexes(
samples_from_file.index(good) for good in
set(samples).intersection(set(samples_from_file))))
+def determine_partials(
+ primary_vals, control_vals, all_target_trait_names,
+ all_target_trait_values, method):
+ """
+ This **WILL** be a migration of
+ `web.webqtl.correlation.correlationFunction.determinePartialsByR` function
+ in GeneNetwork1.
+
+ The function in GeneNetwork1 contains code written in R that is then used to
+ compute the partial correlations.
+ """
+ ## This function is not implemented at this stage
+ return tuple(
+ primary_vals, control_vals, all_target_trait_names,
+ all_target_trait_values, method)
+
def compute_partial_correlations_fast(# pylint: disable=[R0913, R0914]
samples, primary_vals, control_vals, database_filename,
fetched_correlations, method: str, correlation_type: str) -> Tuple[