diff options
author | Frederick Muriuki Muriithi | 2021-10-29 08:28:19 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-11-04 12:45:57 +0300 |
commit | 9ceb958273b8d86d220fa0d2f040fcb4a8233586 (patch) | |
tree | 9cd6b8c60c3e937c4cc159487f76c9966c88db89 | |
parent | 307a83b897b9ece7c9dd1af49bdedc9e1320eb61 (diff) | |
download | genenetwork3-9ceb958273b8d86d220fa0d2f040fcb4a8233586.tar.gz |
Fix linting and typing errors
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
-rw-r--r-- | gn3/computations/partial_correlations.py | 2 | ||||
-rw-r--r-- | gn3/db/correlations.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py index 5777a0b..fce6ad2 100644 --- a/gn3/computations/partial_correlations.py +++ b/gn3/computations/partial_correlations.py @@ -173,6 +173,6 @@ def correlations_of_all_tissue_traits( `web.webqtl.correlation.correlationFunction.calculateCorrOfAllTissueTrait` function in GeneNetwork1. """ - primary_trait_values = primary_trait_symbol_value_dict.values()[0] + primary_trait_values = tuple(primary_trait_symbol_value_dict.values())[0] return batch_computed_tissue_correlation( primary_trait_values, symbol_value_dict, method) diff --git a/gn3/db/correlations.py b/gn3/db/correlations.py index d7954e5..d94759a 100644 --- a/gn3/db/correlations.py +++ b/gn3/db/correlations.py @@ -10,6 +10,8 @@ from gn3.random import random_string from gn3.data_helpers import partition_all from gn3.db.species import translate_to_mouse_gene_id +from gn3.computations.partial_correlations import correlations_of_all_tissue_traits + def get_filename(target_db_name: str, conn: Any) -> str: """ Retrieve the name of the reference database file with which correlations are @@ -275,9 +277,8 @@ def build_temporary_tissue_correlations_table( `web.webqtl.correlation.CorrelationPage.getTempTissueCorrTable` function in GeneNetwork1.""" # We should probably pass the `correlations_of_all_tissue_traits` function - # as an argument to this function and get rid of the two lines immediately + # as an argument to this function and get rid of the one call immediately # following this comment. - from gn3.computations.partial_correlations import correlations_of_all_tissue_traits symbol_corr_dict, symbol_p_value_dict = correlations_of_all_tissue_traits( fetch_gene_symbol_tissue_value_dict_for_trait( (trait_symbol,), probeset_freeze_id, conn), @@ -308,7 +309,7 @@ def build_temporary_tissue_correlations_table( return temp_table_name -def fetch_tissue_correlations( +def fetch_tissue_correlations(# pylint: disable=R0913 dataset: dict, trait_symbol: str, probeset_freeze_id: int, method: str, return_number: int, conn: Any) -> dict: """ |