aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-11-26 11:48:26 +0300
committerFrederick Muriuki Muriithi2021-11-29 12:05:16 +0300
commitd29ef85d44fff9414932d64850f65cb268b1cddd (patch)
treeba75b86a0661a59f85fb2c782eb7ca15036527f5 /gn3
parentf88d8e4446c8c9d6693197a452669e0e9c8ea812 (diff)
downloadgenenetwork3-d29ef85d44fff9414932d64850f65cb268b1cddd.tar.gz
Update typing notations on functions
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
Diffstat (limited to 'gn3')
-rw-r--r--gn3/db/correlations.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/gn3/db/correlations.py b/gn3/db/correlations.py
index c838597..898de75 100644
--- a/gn3/db/correlations.py
+++ b/gn3/db/correlations.py
@@ -4,7 +4,7 @@ feature to access the database to retrieve data needed for computations.
"""
from functools import reduce
-from typing import Any, Dict, Tuple
+from typing import Any, Dict, Tuple, Union
from gn3.random import random_string
from gn3.data_helpers import partition_all
@@ -12,7 +12,8 @@ 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:
+def get_filename(conn: Any, target_db_name: str, text_files_dir: str) -> Union[
+ str, bool]:
"""
Retrieve the name of the reference database file with which correlations are
computed.
@@ -456,8 +457,9 @@ def build_query_tissue_corr(db_type, temp_table, sample_id_columns, joins):
def fetch_all_database_data(# pylint: disable=[R0913, R0914]
conn: Any, species: str, gene_id: int, trait_symbol: str,
- samples: Tuple[str, ...], db_type: str, db_name: str, method: str,
- return_number: int, probeset_freeze_id: int) -> Tuple[Any, Any]:
+ samples: Tuple[str, ...], dataset: dict, method: str,
+ return_number: int, probeset_freeze_id: int) -> Tuple[
+ Tuple[float], int]:
"""
This is a migration of the
`web.webqtl.correlation.CorrelationPage.fetchAllDatabaseData` function in