diff options
author | Frederick Muriuki Muriithi | 2021-11-01 10:52:13 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-11-04 12:45:57 +0300 |
commit | ead4481077922d7f307475e6bc04e617d6594a99 (patch) | |
tree | 586658db87e6ff8d9fdc306432d29e5a1f07113a | |
parent | 457f2a8473a1d44dfcb66d0c28aa1c7a3a256c85 (diff) | |
download | genenetwork3-ead4481077922d7f307475e6bc04e617d6594a99.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.py | 16 |
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[ |