aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-14 13:46:40 +0300
committerFrederick Muriuki Muriithi2021-12-14 13:46:40 +0300
commit14f70b34235dbf43d68ad72ea74a2020af890072 (patch)
treed84ca1beafee4a9e68f6a102ad770a910e4ee3ba /gn3/computations
parent2aa097404a64260217bb06c131376c98adb8c980 (diff)
downloadgenenetwork3-14f70b34235dbf43d68ad72ea74a2020af890072.tar.gz
mypy: ignore some imports and errors
* Ignore some missing library stubs * Ignore some typing errors * Fix obvious typing errors
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/partial_correlations.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py
index 95eb5e9..91e953a 100644
--- a/gn3/computations/partial_correlations.py
+++ b/gn3/computations/partial_correlations.py
@@ -259,8 +259,9 @@ def partial_correlations_fast(# pylint: disable=[R0913, R0914]
## `correlation_type` parameter
return len(all_correlations), tuple(
corr + (
- (fetched_correlations[corr[0]],) if correlation_type == "literature"
- else fetched_correlations[corr[0]][0:2])
+ (fetched_correlations[corr[0]],) # type: ignore[index]
+ if correlation_type == "literature"
+ else fetched_correlations[corr[0]][0:2]) # type: ignore[index]
for idx, corr in enumerate(all_correlations))
def build_data_frame(
@@ -372,7 +373,7 @@ def partial_correlations_normal(# pylint: disable=R0913
return tuple(item) + (trait_database[1], trait_database[2])
return item
- target_trait_names, target_trait_vals = reduce(
+ target_trait_names, target_trait_vals = reduce(# type: ignore[var-annotated]
lambda acc, item: (acc[0]+(item[0],), acc[1]+(item[data_start_pos:],)),
trait_database, (tuple(), tuple()))
@@ -425,7 +426,7 @@ def partial_corrs(# pylint: disable=[R0913]
data_start_pos, dataset, method)
def literature_correlation_by_list(
- conn: Any, species: str, trait_list: Tuple[dict]) -> Tuple[dict]:
+ conn: Any, species: str, trait_list: Tuple[dict]) -> Tuple[dict, ...]:
"""
This is a migration of the
`web.webqtl.correlation.CorrelationPage.getLiteratureCorrelationByList`