Skip to content

Commit 3e99729

Browse files
committed
flake8 corrections
1 parent b64b482 commit 3e99729

5 files changed

Lines changed: 9 additions & 10 deletions

File tree

src/diffupath/cli.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@ def evaluate(
255255
graph,
256256
kernel,
257257
k=iterations)
258-
259-
260258
else:
261259
raise ValueError("The comparison method provided not match any provided method.")
262260

src/diffupath/cross_validation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ def cross_validation_by_subgraph(data_input,
9595
if universe_kernel is None:
9696
universe_kernel = kernel
9797

98-
9998
input_diff, validation_diff = _get_random_cv_split_input_and_validation(data_input[type],
10099
kernel)
101100
input_diff_universe, validation_diff_universe = _get_random_cv_split_input_and_validation(data_input[type],

src/diffupath/pathme_processing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414
def calculate_database_sets_as_dict(nodes, database):
1515
gene_nodes, mirna_nodes, metabolite_nodes, bp_nodes = calculate_database_sets(nodes, database)
16-
return {'gene_nodes': gene_nodes, 'mirna_nodes': mirna_nodes, 'metabolite_nodes': metabolite_nodes,
16+
return {'gene_nodes': gene_nodes,
17+
'mirna_nodes': mirna_nodes,
18+
'metabolite_nodes': metabolite_nodes,
1719
'bp_nodes': bp_nodes}
1820

1921

src/diffupath/topological_analyses.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
"""Topological analyses."""
44

5-
from collections import defaultdict
6-
75
import warnings
6+
from collections import defaultdict
87

98
import networkx as nx
109
import numpy as np
@@ -19,16 +18,17 @@ def generate_pagerank_baseline(graph: nx.Graph, background_mat: Matrix) -> Matri
1918
pagerank_scores = nx.pagerank(graph)
2019

2120
if len(pagerank_scores.values()) != len(background_mat.mat):
22-
warnings.warn('The provided graph do not match the kernel nodes amount. '
23-
'The nodes will be matched (deleting and filling missing) according to the reference Matrix.')
21+
warnings.warn(
22+
'The provided graph do not match the kernel nodes amount. The nodes will be matched (deleting and filling missing) according to the reference Matrix.')
2423

2524
return Matrix(mat=np.array(
2625
list(pagerank_scores.values())).reshape(
2726
(len(list(pagerank_scores.values())), 1)
2827
),
2928
rows_labels=list(pagerank_scores.keys()),
3029
cols_labels=['PageRank']
31-
).match_delete_rows(background_mat.rows_labels).match_missing_rows(background_mat.rows_labels).match_rows(background_mat)
30+
).match_delete_rows(background_mat.rows_labels).match_missing_rows(background_mat.rows_labels).match_rows(
31+
background_mat)
3232

3333

3434
def resistance_distance(G=None, M=None, normalized=False):

src/diffupath/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def show_venn_diagram(
111111
intersections_len = [len(intersection) for name, intersection in intersections.items()]
112112

113113
plt.figure(figsize=(17, 8))
114-
v = venn3(subsets=intersections_len, set_labels=set_labels)
114+
_ = venn3(subsets=intersections_len, set_labels=set_labels)
115115

116116
plt.show()
117117

0 commit comments

Comments
 (0)