From 637454a3fda8265ec768330bbbdd54c5b7a4e64c Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Tue, 1 Jul 2025 15:19:17 -0700 Subject: [PATCH 01/14] chore: bump dependencies --- environment.yml | 67 +++++++++++++++++++++++++------------------- pyproject.toml | 41 ++++++++++++++------------- spras/analysis/ml.py | 2 +- 3 files changed, 60 insertions(+), 50 deletions(-) diff --git a/environment.yml b/environment.yml index 98abac383..8b5c777fd 100644 --- a/environment.yml +++ b/environment.yml @@ -2,37 +2,46 @@ name: spras channels: - conda-forge dependencies: - - adjusttext=0.7.3.1 - - bioconda::snakemake-minimal=8.17.0 - - docker-py=5.0 - - matplotlib=3.6 - - networkx=2.8 - - pandas=1.5 - - numpy=1.26.4 - - pre-commit=2.20 # Only required for development - - go=1.24 # Only required for development - - pytest=8.0 # Only required for development - - python=3.11 - - pip=22.1 - - requests=2.28 - - scikit-learn=1.2 - - seaborn=0.12 - - spython=0.2 - # for dsub - - python-dateutil<=2.9.0 - - pytz<=2024.1 - - pyyaml<=6.0.1 - - tenacity<=8.2.3 - - tabulate<=0.9.0 + - adjusttext=1.3.0 + - bioconda::snakemake-minimal=9.6.2 + - docker=7.1.0 + - matplotlib=3.10.3 + - networkx=3.5 + - pandas=2.3.0 + - numpy=2.3.1 + - requests=2.32.4 + - scikit-learn=1.7.0 + - seaborn=0.13.2 + - spython=0.3.14 + # Only required for GraphSpace - - commonmark=0.9 - - docutils=0.19 - - jinja2=3.1 - - mock=4.0 - - recommonmark=0.7 - - sphinx=6.0 + - commonmark=0.9.1 + - docutils=0.21.2 + - jinja2=3.1.6 + - mock=5.2.0 + - recommonmark=0.7.1 + - sphinx=8.2.3 - sphinx-rtd-theme=2.0.0 + # graphspace_python is under pip + + # conda-specific for dsub + - python-dateutil=2.9.0 + - pytz=2025.2 + - pyyaml=6.0.2 + - tenacity=9.1.2 + - tabulate=0.9.0 + + # toolchain deps + - pip=22.1 + # This should be the same as requires-python minus the >=. + - python=3.11 + + # development dependencies + - pre-commit=4.2.0 + - pytest=8.4.1 + # development dependencies - conda-specific + - go=1.24 + - pip: - graphspace_python==1.3.1 - dsub==0.4.13 - diff --git a/pyproject.toml b/pyproject.toml index 3e90f7b1e..ccebdaf0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,34 +19,35 @@ classifiers = [ requires-python = ">=3.11" dependencies = [ "adjusttext==0.7.3", - # A bug was introduced in older versions of snakemake that prevent it from running. Update to fix - "snakemake==8.17.0", - "docker==5.0.3", # Switched from docker-py to docker because docker-py is not maintained in pypi. This appears to have no effect - "matplotlib==3.6", - "networkx==2.8", - "pandas==1.5", - "numpy==1.26.4", - "pip==22.1", - "requests==2.28", - "scikit-learn==1.2", - "seaborn==0.12", - "spython==0.2", + "snakemake==9.6.2", + "docker==7.1.0", + "matplotlib==3.10.3", + "networkx==3.5", + "pandas==2.3.0", + "numpy==2.3.1", + "requests==2.32.4", + "scikit-learn==1.7.0", + "seaborn==0.13.2", + "spython==0.3.14", # Only required for GraphSpace "commonmark==0.9", - "docutils==0.19", - "jinja2==3.1", - "mock==4.0", - "recommonmark==0.7", - "sphinx==6.0", - "graphspace_python==1.3.1", + "docutils==0.21.2", + "jinja2==3.1.6", + "mock==5.2.0", + "recommonmark==0.7.1", + "sphinx==8.2.3", "sphinx-rtd-theme==2.0.0", + "graphspace_python==1.3.1", + + # toolchain deps + "pip==22.1", ] [project.optional-dependencies] dev = [ # Only required for development - "pre-commit==2.20", - "pytest==8.0", + "pre-commit==4.2.0", + "pytest==8.4.1", ] [project.urls] diff --git a/spras/analysis/ml.py b/spras/analysis/ml.py index c1c952ce6..36ae6f113 100644 --- a/spras/analysis/ml.py +++ b/spras/analysis/ml.py @@ -303,7 +303,7 @@ def hac_horizontal(dataframe: pd.DataFrame, output_png: str, output_file: str, l # plotting figure plt.figure(figsize=(10, 7)) - model = AgglomerativeClustering(linkage=linkage, affinity=metric,distance_threshold=0.5, n_clusters=None) + model = AgglomerativeClustering(linkage=linkage, metric=metric,distance_threshold=0.5, n_clusters=None) model = model.fit(df) plt.figure(figsize=(10, 7)) plt.title("Hierarchical Agglomerative Clustering Dendrogram") From 30c731d0fc9491487647e9fbd0551854ba74a0fc Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Wed, 2 Jul 2025 20:58:19 +0000 Subject: [PATCH 02/14] chore: relax sphinx --- environment.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 8b5c777fd..dd7374721 100644 --- a/environment.yml +++ b/environment.yml @@ -20,7 +20,7 @@ dependencies: - jinja2=3.1.6 - mock=5.2.0 - recommonmark=0.7.1 - - sphinx=8.2.3 + - sphinx=7.4.7 - sphinx-rtd-theme=2.0.0 # graphspace_python is under pip diff --git a/pyproject.toml b/pyproject.toml index ccebdaf0a..5fe2f7fe9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ dependencies = [ "jinja2==3.1.6", "mock==5.2.0", "recommonmark==0.7.1", - "sphinx==8.2.3", + "sphinx==7.4.7", "sphinx-rtd-theme==2.0.0", "graphspace_python==1.3.1", From 613eaa537db0d2ae4cc28b2a65bf915099092678 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Wed, 2 Jul 2025 21:00:57 +0000 Subject: [PATCH 03/14] chore: debmp docutils --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index dd7374721..621ad6001 100644 --- a/environment.yml +++ b/environment.yml @@ -16,7 +16,7 @@ dependencies: # Only required for GraphSpace - commonmark=0.9.1 - - docutils=0.21.2 + - docutils=0.20.1 - jinja2=3.1.6 - mock=5.2.0 - recommonmark=0.7.1 From 2a62446b921ef5b865d35c4a97b5694f85e44912 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Wed, 2 Jul 2025 21:05:06 +0000 Subject: [PATCH 04/14] chore: debump docutils in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5fe2f7fe9..d0eafa0fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ "spython==0.3.14", # Only required for GraphSpace "commonmark==0.9", - "docutils==0.21.2", + "docutils==0.20.1", "jinja2==3.1.6", "mock==5.2.0", "recommonmark==0.7.1", From faf7f8e6880ac54f7a291b2401aa95e4b51a9339 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Wed, 2 Jul 2025 21:09:20 +0000 Subject: [PATCH 05/14] fix: note about conda docker py --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 621ad6001..cf1f85b4a 100644 --- a/environment.yml +++ b/environment.yml @@ -4,7 +4,8 @@ channels: dependencies: - adjusttext=1.3.0 - bioconda::snakemake-minimal=9.6.2 - - docker=7.1.0 + # Conda refers to pypi/docker as docker-py. + - docker-py=7.1.0 - matplotlib=3.10.3 - networkx=3.5 - pandas=2.3.0 From 2b3332548b94c165ef4cff73cfcce262cfe43f70 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Thu, 3 Jul 2025 09:42:50 -0700 Subject: [PATCH 06/14] test: try flipping pca untested; need to open my devcontainer --- test/ml/expected/expected-pca-coordinates.tsv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ml/expected/expected-pca-coordinates.tsv b/test/ml/expected/expected-pca-coordinates.tsv index b6371c84f..7f9666e0d 100644 --- a/test/ml/expected/expected-pca-coordinates.tsv +++ b/test/ml/expected/expected-pca-coordinates.tsv @@ -1,4 +1,4 @@ algorithm PC1 PC2 -test-data-s1 -2.006650210482033 -0.9865875190637743 -test-data-s2 -1.5276508866841987 1.0799457247533237 -test-data-s3 3.534301097166232 -0.0933582056895495 \ No newline at end of file +test-data-s1 2.006650210482033 -0.9865875190637743 +test-data-s2 1.5276508866841987 1.0799457247533237 +test-data-s3 -3.534301097166232 -0.0933582056895495 \ No newline at end of file From ae02c993b8fe7fff590d3cf17784a46f4135dd13 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 3 Jul 2025 17:04:48 +0000 Subject: [PATCH 07/14] test: add second signage pca --- test/ml/expected/expected-pca-coordinates-2.tsv | 4 ++++ test/ml/test_ml.py | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 test/ml/expected/expected-pca-coordinates-2.tsv diff --git a/test/ml/expected/expected-pca-coordinates-2.tsv b/test/ml/expected/expected-pca-coordinates-2.tsv new file mode 100644 index 000000000..b6371c84f --- /dev/null +++ b/test/ml/expected/expected-pca-coordinates-2.tsv @@ -0,0 +1,4 @@ +algorithm PC1 PC2 +test-data-s1 -2.006650210482033 -0.9865875190637743 +test-data-s2 -1.5276508866841987 1.0799457247533237 +test-data-s3 3.534301097166232 -0.0933582056895495 \ No newline at end of file diff --git a/test/ml/test_ml.py b/test/ml/test_ml.py index 22296d142..9d2bc5ba8 100644 --- a/test/ml/test_ml.py +++ b/test/ml/test_ml.py @@ -82,8 +82,12 @@ def test_pca(self): def test_pca_robustness(self): dataframe = ml.summarize_networks([INPUT_DIR + 'test-data-s1/s1.txt', INPUT_DIR + 'test-data-s2/s2.txt', INPUT_DIR + 'test-data-s3/s3.txt']) + # PCA signage now depends on the input data: we need two differently signed PCA coordinate files. + # See https://scikit-learn.org/stable/whats_new/v1.5.html#changed-models for more info. expected = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates.tsv') + expected_other = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-2.tsv') expected = expected.round(5) + expected_other = expected_other.round(5) for _ in range(5): dataframe_shuffled = dataframe.sample(frac=1, axis=1) # permute the columns ml.pca(dataframe_shuffled, OUT_DIR + 'pca-shuffled-columns.png', OUT_DIR + 'pca-shuffled-columns-variance.txt', @@ -92,7 +96,7 @@ def test_pca_robustness(self): coord = coord.round(5) # round values to 5 digits to account for numeric differences across machines coord.sort_values(by='algorithm', ignore_index=True, inplace=True) - assert coord.equals(expected) + assert coord.equals(expected) or coord.equals(expected_other) for _ in range(5): dataframe_shuffled = dataframe.sample(frac=1, axis=0) # permute the rows @@ -102,7 +106,7 @@ def test_pca_robustness(self): coord = coord.round(5) # round values to 5 digits to account for numeric differences across machines coord.sort_values(by='algorithm', ignore_index=True, inplace=True) - assert coord.equals(expected) + assert coord.equals(expected) or coord.equals(expected_other) def test_hac_horizontal(self): dataframe = ml.summarize_networks([INPUT_DIR + 'test-data-s1/s1.txt', INPUT_DIR + 'test-data-s2/s2.txt', INPUT_DIR + 'test-data-s3/s3.txt']) From 31d76e63cc650e5006699e7da7d70a815dca01f4 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 19 Jul 2025 13:34:51 -0700 Subject: [PATCH 08/14] test(expected-pca-coordinates): rn (-2 -> -negated) --- ...a-coordinates-2.tsv => expected-pca-coordinates-negated.tsv} | 0 test/ml/test_ml.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename test/ml/expected/{expected-pca-coordinates-2.tsv => expected-pca-coordinates-negated.tsv} (100%) diff --git a/test/ml/expected/expected-pca-coordinates-2.tsv b/test/ml/expected/expected-pca-coordinates-negated.tsv similarity index 100% rename from test/ml/expected/expected-pca-coordinates-2.tsv rename to test/ml/expected/expected-pca-coordinates-negated.tsv diff --git a/test/ml/test_ml.py b/test/ml/test_ml.py index 9d2bc5ba8..ad92ff60d 100644 --- a/test/ml/test_ml.py +++ b/test/ml/test_ml.py @@ -85,7 +85,7 @@ def test_pca_robustness(self): # PCA signage now depends on the input data: we need two differently signed PCA coordinate files. # See https://scikit-learn.org/stable/whats_new/v1.5.html#changed-models for more info. expected = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates.tsv') - expected_other = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-2.tsv') + expected_other = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-negated.tsv') expected = expected.round(5) expected_other = expected_other.round(5) for _ in range(5): From 88c856843304078b35fe9d9d0df73144d6aa02a0 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Wed, 23 Jul 2025 10:24:23 -0700 Subject: [PATCH 09/14] fix: correct negated file --- test/ml/expected/expected-pca-coordinates-negated.tsv | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/ml/expected/expected-pca-coordinates-negated.tsv b/test/ml/expected/expected-pca-coordinates-negated.tsv index b6371c84f..cb8f1de5f 100644 --- a/test/ml/expected/expected-pca-coordinates-negated.tsv +++ b/test/ml/expected/expected-pca-coordinates-negated.tsv @@ -1,4 +1,5 @@ -algorithm PC1 PC2 -test-data-s1 -2.006650210482033 -0.9865875190637743 -test-data-s2 -1.5276508866841987 1.0799457247533237 -test-data-s3 3.534301097166232 -0.0933582056895495 \ No newline at end of file +datapoint_labels PC1 PC2 +test-data-s1 0.94594398 -0.46508182 +test-data-s2 0.72014153 0.5090913 +test-data-s3 -1.66608552 -0.04400948 +centroid 0.0 0.0 From cc896241173c7280d854423fe14a02e69a62380b Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Wed, 23 Jul 2025 10:26:07 -0700 Subject: [PATCH 10/14] style: fmt --- test/ml/test_ml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ml/test_ml.py b/test/ml/test_ml.py index b7aac572f..0e90e3867 100644 --- a/test/ml/test_ml.py +++ b/test/ml/test_ml.py @@ -88,7 +88,7 @@ def test_pca_remove_empty_pathways(self): coord = pd.read_table(OUT_DIR + 'pca-coordinates.tsv') coord = coord.round(5) # round values to 5 digits to account for numeric differences across machines expected = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates.tsv') - expected_other = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-negated.tsv') + pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-negated.tsv') expected = expected.round(5) assert coord.equals(expected) From 05b9a69f456e8f5ee785e4de48bf5a68e6fbc8e0 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Wed, 23 Jul 2025 17:57:44 +0000 Subject: [PATCH 11/14] fix: sort datapoint_labels --- test/ml/expected/expected-pca-coordinates-negated.tsv | 2 +- test/ml/expected/expected-pca-coordinates.tsv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ml/expected/expected-pca-coordinates-negated.tsv b/test/ml/expected/expected-pca-coordinates-negated.tsv index cb8f1de5f..4ccadef05 100644 --- a/test/ml/expected/expected-pca-coordinates-negated.tsv +++ b/test/ml/expected/expected-pca-coordinates-negated.tsv @@ -1,5 +1,5 @@ datapoint_labels PC1 PC2 +centroid 0.0 0.0 test-data-s1 0.94594398 -0.46508182 test-data-s2 0.72014153 0.5090913 test-data-s3 -1.66608552 -0.04400948 -centroid 0.0 0.0 diff --git a/test/ml/expected/expected-pca-coordinates.tsv b/test/ml/expected/expected-pca-coordinates.tsv index 69b922fa4..1a091964e 100644 --- a/test/ml/expected/expected-pca-coordinates.tsv +++ b/test/ml/expected/expected-pca-coordinates.tsv @@ -1,5 +1,5 @@ datapoint_labels PC1 PC2 +centroid 0.0 0.0 test-data-s1 -0.94594398 -0.46508182 test-data-s2 -0.72014153 0.5090913 test-data-s3 1.66608552 -0.04400948 -centroid 0.0 0.0 From 310fb0db6daeb1d0e4de620d93cd9cea47feea28 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Wed, 23 Jul 2025 18:23:29 +0000 Subject: [PATCH 12/14] chore: drop unnecessary line --- test/ml/test_ml.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/ml/test_ml.py b/test/ml/test_ml.py index 0e90e3867..35826ae4b 100644 --- a/test/ml/test_ml.py +++ b/test/ml/test_ml.py @@ -88,7 +88,6 @@ def test_pca_remove_empty_pathways(self): coord = pd.read_table(OUT_DIR + 'pca-coordinates.tsv') coord = coord.round(5) # round values to 5 digits to account for numeric differences across machines expected = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates.tsv') - pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-negated.tsv') expected = expected.round(5) assert coord.equals(expected) From ed89f6babe6dda1f6c7cd57f97311cfc6376c2b2 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 24 Jul 2025 17:06:42 +0000 Subject: [PATCH 13/14] test: kde negated --- test/ml/expected/expected-pca-coordinates-kde-negated.tsv | 7 +++++++ test/ml/test_ml.py | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test/ml/expected/expected-pca-coordinates-kde-negated.tsv diff --git a/test/ml/expected/expected-pca-coordinates-kde-negated.tsv b/test/ml/expected/expected-pca-coordinates-kde-negated.tsv new file mode 100644 index 000000000..3c13c8c4e --- /dev/null +++ b/test/ml/expected/expected-pca-coordinates-kde-negated.tsv @@ -0,0 +1,7 @@ +datapoint_labels PC1 PC2 +test-data-s1 -1.01220906 0.05003395 +test-data-s2 -0.84372464 -0.59953316 +test-data-s3 1.56185985 -0.48650911 +test-data-empty 0.29407385 1.03600832 +centroid 0.0 0.0 +kde_peak 0.65469949 0.06343901 diff --git a/test/ml/test_ml.py b/test/ml/test_ml.py index 35826ae4b..0620baedb 100644 --- a/test/ml/test_ml.py +++ b/test/ml/test_ml.py @@ -99,10 +99,12 @@ def test_pca_kernel_density(self): OUT_DIR + 'pca-coordinates-kde.tsv', kde=True) coord = pd.read_table(OUT_DIR + 'pca-coordinates-kde.tsv') expected = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-kde.tsv') + expected_negated = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-kde-negated.tsv') coord_kde_peak = coord.loc[coord['datapoint_labels'] == 'kde_peak'].round(5) expected_kde_peak = expected.loc[expected['datapoint_labels'] == 'kde_peak'].round(5) + expected_kde_peak_negated = expected_negated.loc[expected_negated['datapoint_labels'] == 'kde_peak'].round(5) - assert coord_kde_peak.equals(expected_kde_peak) + assert coord_kde_peak.equals(expected_kde_peak) or coord_kde_peak.equals(expected_kde_peak_negated) def test_pca_robustness(self): dataframe = ml.summarize_networks([INPUT_DIR + 'test-data-s1/s1.txt', INPUT_DIR + 'test-data-s2/s2.txt', From 9362f5f7a2627d3c97391683f9f094dcbce1f3bc Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 24 Jul 2025 19:28:46 +0000 Subject: [PATCH 14/14] test: finalize --- ...gated.tsv => expected-pca-coordinates-sorted-negated.tsv} | 0 test/ml/expected/expected-pca-coordinates-sorted.tsv | 5 +++++ test/ml/expected/expected-pca-coordinates.tsv | 2 +- test/ml/test_ml.py | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) rename test/ml/expected/{expected-pca-coordinates-negated.tsv => expected-pca-coordinates-sorted-negated.tsv} (100%) create mode 100644 test/ml/expected/expected-pca-coordinates-sorted.tsv diff --git a/test/ml/expected/expected-pca-coordinates-negated.tsv b/test/ml/expected/expected-pca-coordinates-sorted-negated.tsv similarity index 100% rename from test/ml/expected/expected-pca-coordinates-negated.tsv rename to test/ml/expected/expected-pca-coordinates-sorted-negated.tsv diff --git a/test/ml/expected/expected-pca-coordinates-sorted.tsv b/test/ml/expected/expected-pca-coordinates-sorted.tsv new file mode 100644 index 000000000..1a091964e --- /dev/null +++ b/test/ml/expected/expected-pca-coordinates-sorted.tsv @@ -0,0 +1,5 @@ +datapoint_labels PC1 PC2 +centroid 0.0 0.0 +test-data-s1 -0.94594398 -0.46508182 +test-data-s2 -0.72014153 0.5090913 +test-data-s3 1.66608552 -0.04400948 diff --git a/test/ml/expected/expected-pca-coordinates.tsv b/test/ml/expected/expected-pca-coordinates.tsv index 1a091964e..69b922fa4 100644 --- a/test/ml/expected/expected-pca-coordinates.tsv +++ b/test/ml/expected/expected-pca-coordinates.tsv @@ -1,5 +1,5 @@ datapoint_labels PC1 PC2 -centroid 0.0 0.0 test-data-s1 -0.94594398 -0.46508182 test-data-s2 -0.72014153 0.5090913 test-data-s3 1.66608552 -0.04400948 +centroid 0.0 0.0 diff --git a/test/ml/test_ml.py b/test/ml/test_ml.py index 0620baedb..8a8cb1687 100644 --- a/test/ml/test_ml.py +++ b/test/ml/test_ml.py @@ -111,8 +111,8 @@ def test_pca_robustness(self): INPUT_DIR + 'test-data-s3/s3.txt']) # PCA signage now depends on the input data: we need two differently signed PCA coordinate files. # See https://scikit-learn.org/stable/whats_new/v1.5.html#changed-models for more info. - expected = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates.tsv') - expected_other = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-negated.tsv') + expected = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-sorted.tsv') + expected_other = pd.read_table(EXPECT_DIR + 'expected-pca-coordinates-sorted-negated.tsv') expected = expected.round(5) expected_other = expected_other.round(5) expected.sort_values(by='datapoint_labels', ignore_index=True, inplace=True)