Skip to content

Commit a1d8669

Browse files
authored
add check for reduction arg
1 parent a453f81 commit a1d8669

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/eschr/tl/_clustering.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ def run_base_clustering(args_in):
284284
zarr_loc = args_in[0]
285285
hyperparams_ls = args_in[1]
286286
sparse = args_in[2]
287+
reduction = args_in[3]
287288

288289
z1 = zarr.open(zarr_loc, mode="r")
289290

@@ -335,7 +336,8 @@ def run_base_clustering(args_in):
335336
print("Data likely needs to be preprocessed, results may be suboptimal")
336337

337338
## Data subspace feature extraction
338-
data = run_pca_dim_reduction(data)
339+
if reduction.lower() == 'pca':
340+
data = run_pca_dim_reduction(data)
339341
## Run leiden clustering
340342
clusters = run_la_clustering(
341343
X=data, k=iter_k, la_res=la_res / 100, metric=metric

0 commit comments

Comments
 (0)