Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup smoke test for FindClusters #9641

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Conversation

dcollins15
Copy link
Contributor

Updates the smoke test in test_find_clusters.R to accommodate variability in label assignments given by FindClusters across different systems.

On 14/01/2024, the maintainers of Seurat were contacted by CRAN with the following message:


Dear maintainer,

Please see the problems shown on
https://cran.r-project.org/web/checks/check_results_Seurat.html.

Please correct before 2025-01-28 to safely retain your package on CRAN.

There is a check service for M1mac issues: see
https://www.stats.ox.ac.uk/pub/bdr/M1mac/README.txt .
However, it is running a much older version of the OS
and toolchain -- and the latter often matters.

The CRAN Team


tl;dr—we have until 2025/01/28 to resolve the M1mac errors currently being thrown by the CRAN package checks for Seurat:

Failure (test_find_clusters.R:39:3): Smoke test for `FindClusters`
results[[1]] not equal to factor(3, levels = 0:5).
1 string mismatch

Failure (test_find_clusters.R:40:3): Smoke test for `FindClusters`
results[[15]] not equal to factor(4, levels = 0:5).
1 string mismatch

Failure (test_find_clusters.R:41:3): Smoke test for `FindClusters`
results[[24]] not equal to factor(0, levels = 0:5).
1 string mismatch

I'm not totally sure what's causing the difference but I was able to reproduce the error on my local machine (M3mac) after adjusting my environment some. If we're unhappy with this variability I can try to investigate further but for now, I'm pretty confident that this update will resolve the issue. The fix is simple enough, instead of spot-checking the cluster labels for specific cells, the test now checks:

  • That every cell was assigned a cluster label (no null values)
  • That the correct cluster labels were assigned (but not to which cells)
  • That the distribution of cluster sizes matches the expected output

Do we think it's worth introducing a tolerance onto the cluster size check? 🤔

Once it has been approved and merged I will immediately start the process of releasing Seurat 5.2.1 to CRAN 🚀

@dcollins15 dcollins15 requested a review from rsatija January 22, 2025 19:58
@dcollins15 dcollins15 marked this pull request as ready for review January 22, 2025 21:46
@dcollins15 dcollins15 merged commit fd54b5e into develop Jan 23, 2025
3 checks passed
@dcollins15 dcollins15 deleted the fix/test-find-clusters branch January 23, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants