Skip to content

Commit 15c583c

Browse files
committed
Corrected behavior in recursive_dbscan.py - it didnt skip PCA properly when there were less than 50 contigs
1 parent ec1717b commit 15c583c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pipeline/recursive_dbscan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def run_BH_tSNE(table, do_pca=True):
5454

5555
# PCA
5656

57-
if (len(normalized_k_mer_submatrix[0]) > pca_dimensions) and (do_pca == True):
57+
if (len(normalized_k_mer_submatrix) > pca_dimensions) and (do_pca == True):
5858
logger.info('run_BH_tSNE: Principal component analysis')
5959
pca = decomposition.PCA(n_components=pca_dimensions)
6060
pca_matrix = pca.fit_transform(normalized_k_mer_submatrix)
@@ -72,7 +72,7 @@ def run_BH_tSNE(table, do_pca=True):
7272
logger.info(str(len(normalized_k_mer_submatrix)) + ' data points')
7373
logger.info(str(len(normalized_k_mer_submatrix[0])) + ' dimensions')
7474

75-
if (len(normalized_k_mer_submatrix[0]) > pca_dimensions) and (do_pca == True):
75+
if (len(normalized_k_mer_submatrix) > pca_dimensions) and (do_pca == True):
7676
X = np.array(pca_matrix)
7777
else:
7878
X = np.array(normalized_k_mer_submatrix)

0 commit comments

Comments
 (0)