Skip to content

Commit

Permalink
Use minimum of 3 components for test_pca_plotting for plot_pca_coords…
Browse files Browse the repository at this point in the history
…_3d()
  • Loading branch information
leehart committed Jul 30, 2024
1 parent e32e365 commit a85afea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/anoph/test_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def test_pca_plotting(fixture, api: AnophelesPca):
n_samples = ds.sizes["samples"]
n_snps_available = ds.sizes["variants"]
n_snps = random.randint(1, n_snps_available)
n_components = random.randint(2, min(n_samples, n_snps))
# PC3 required for plot_pca_coords_3d()
n_components = random.randint(3, min(n_samples, n_snps))

# Run the PCA.
pca_df, pca_evr = api.pca(
Expand Down

0 comments on commit a85afea

Please sign in to comment.