Skip to content

Commit 045d107

Browse files
author
zhoujt1994
authored
Update balanced_pca.py
1 parent f70e294 commit 045d107

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ALLCools/clustering/balanced_pca.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ def significant_pc_test(adata: anndata.AnnData, p_cutoff=0.1, update=True, obsm=
119119

120120
def pc_ks_test(pcs, p_cutoff=0.1, min_pc=4):
121121
i = 0
122-
for i in range(pcs.shape[1] - 1):
122+
for i in range(pcs.shape[1]):
123+
if i == (pcs.shape[1]-1):
124+
break
123125
cur_pc = pcs[:, i]
124126
next_pc = pcs[:, i + 1]
125127
_, p = ks_2samp(cur_pc, next_pc)

0 commit comments

Comments
 (0)