Skip to content

Commit 7d50735

Browse files
authored
clean up old prints etc.
1 parent aefa797 commit 7d50735

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/eschr/tl/main.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@
88
import warnings
99
from itertools import repeat
1010

11-
import leidenalg as la
1211
import numpy as np
1312
import pandas as pd
1413
import zarr
15-
from igraph import Graph
1614
from scipy.sparse import coo_matrix, csr_matrix, hstack
1715
from scipy.spatial.distance import pdist, squareform
18-
from sklearn import metrics
1916

2017
from ._zarr_utils import (make_zarr_sparse, make_zarr_dense)
2118
from ._clustering import (run_base_clustering, consensus_cluster_leiden)
@@ -179,12 +176,11 @@ def ensemble(
179176
]
180177
args = list(zip(data_iterator, hyperparam_iterator))
181178

182-
print("starting ensemble clustering multiprocess")
183-
# out = np.array(parmap(run_base_clustering, args, nprocs=nprocs))
179+
print("Starting ensemble clustering multiprocess")
184180
out = parmap(run_base_clustering, args, nprocs=nprocs)
185181

186182
try:
187-
clust_out = hstack(out) # [x[0] for x in out]
183+
clust_out = hstack(out)
188184
except Exception:
189185
print(
190186
"consensus_cluster.py, line 599, in ensemble: clust_out = hstack(out[:,0])"
@@ -227,12 +223,11 @@ def consensus(n, bg, nprocs):
227223
## Run final consensus
228224
res_ls = [x / 1000 for x in range(50, 975, 25)] # 0.05 to 0.95 inclusive by 0.025
229225

230-
print("starting consensus multiprocess")
226+
print("Starting consensus multiprocess")
231227
start_time = time.perf_counter()
232228
bg_iterator = repeat(bg, len(res_ls))
233229
n_iterator = repeat(n, len(res_ls))
234230
args = list(zip(n_iterator, res_ls, bg_iterator))
235-
# out = np.array(parmap(consensus_cluster_leiden, args, nprocs=self.nprocs))
236231
out = parmap(consensus_cluster_leiden, args, nprocs=nprocs)
237232

238233
all_clusterings = [pd.DataFrame(x[0], dtype=int) for x in out]
@@ -348,7 +343,7 @@ def consensus_cluster(
348343
la_res_range = (
349344
int(la_res_range[0]),
350345
int(la_res_range[1]),
351-
) # , per_iter_clust_assigns
346+
)
352347
bipartite = ensemble(
353348
zarr_loc=zarr_loc,
354349
reduction=reduction,

0 commit comments

Comments
 (0)