diff options
author | Alexander Kabui | 2021-05-03 21:53:20 +0300 |
---|---|---|
committer | Alexander Kabui | 2021-05-03 21:53:20 +0300 |
commit | 82a75b3efd23a8dba1c8eea15c4fc450219a1f86 (patch) | |
tree | 11457fecd5b454962f1db4320f244554b13ce6e1 /gn3 | |
parent | 56e66507a55069b8904dd39ab52c91564df8884c (diff) | |
download | genenetwork3-82a75b3efd23a8dba1c8eea15c4fc450219a1f86.tar.gz |
add default no of cores
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/computations/correlations.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py index e5a70da..0d15d9b 100644 --- a/gn3/computations/correlations.py +++ b/gn3/computations/correlations.py @@ -137,7 +137,7 @@ def compute_all_sample_correlation(this_trait, processed_values.append((trait_name, corr_method, *filter_shared_sample_keys( this_trait_samples, target_trait_data))) - with multiprocessing.Pool() as pool: + with multiprocessing.Pool(4) as pool: results = pool.starmap(compute_sample_r_correlation, processed_values) for sample_correlation in results: @@ -457,7 +457,7 @@ def compute_tissue_correlation(primary_tissue_dict: dict, processed_values.append( (primary_tissue_vals, target_tissue_vals, corr_method, trait_id)) - with multiprocessing.Pool() as pool: + with multiprocessing.Pool(4) as pool: results = pool.starmap( tissue_correlation_for_trait_list, processed_values) for result in results: |