diff options
author | Muriithi Frederick Muriuki | 2021-08-20 14:24:35 +0300 |
---|---|---|
committer | Muriithi Frederick Muriuki | 2021-08-20 14:24:35 +0300 |
commit | 0023b7a0e4a794444364b403cba72e07213c8419 (patch) | |
tree | c6613c66cb9d041acbea7f132c89a26203c2a1e0 /gn3/computations | |
parent | 96af4e9e32ed167a8d70cf7761b709b1a37bb344 (diff) | |
parent | c9ee473ff7797f6bbd7507eb55c772a3a646acee (diff) | |
download | genenetwork3-0023b7a0e4a794444364b403cba72e07213c8419.tar.gz |
Merge branch 'main' of github.com:genenetwork/genenetwork3 into heatmap_generation
Diffstat (limited to 'gn3/computations')
-rw-r--r-- | gn3/computations/correlations.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py index 8d76c09..bb13ff1 100644 --- a/gn3/computations/correlations.py +++ b/gn3/computations/correlations.py @@ -124,9 +124,9 @@ def filter_shared_sample_keys(this_samplelist, return (this_vals, target_vals) -def speed_compute_all_sample_correlation(this_trait, - target_dataset, - corr_method="pearson") -> List: +def fast_compute_all_sample_correlation(this_trait, + target_dataset, + corr_method="pearson") -> List: """Given a trait data sample-list and target__datasets compute all sample correlation this functions uses multiprocessing if not use the normal fun @@ -362,8 +362,7 @@ def compute_tissue_correlation(primary_tissue_dict: dict, target_tissues_values=target_tissue_vals, trait_id=trait_id, corr_method=corr_method) - tissue_result_dict = {trait_id: tissue_result} - tissues_results.append(tissue_result_dict) + tissues_results.append(tissue_result) return sorted( tissues_results, key=lambda trait_name: -abs(list(trait_name.values())[0]["tissue_corr"])) @@ -386,9 +385,9 @@ def process_trait_symbol_dict(trait_symbol_dict, symbol_tissue_vals_dict) -> Lis return traits_tissue_vals -def speed_compute_tissue_correlation(primary_tissue_dict: dict, - target_tissues_data: dict, - corr_method: str): +def fast_compute_tissue_correlation(primary_tissue_dict: dict, + target_tissues_data: dict, + corr_method: str): """Experimental function that uses multiprocessing for computing tissue correlation |