Closed
Conversation
Reviewer's GuideThis PR modernizes ggplot-related tests, updates z-score hit computation to use dplyr::reframe instead of summarise, and comments out a fragile robust z-score test, while lightly adjusting documentation for find_zscore_hit. Flow diagram for updated find_zscore_hit z-score hit computationflowchart TD
A["find_zscore_hit(table_treate_vs_control, number_barcode, metric)"] --> B{metric}
B -- "median" --> C["Group rows by Gene"]
C --> D["Filter rows with Zscore < median(Zscore)"]
D --> E["dplyr::group_by(Gene)"]
E --> F["dplyr::reframe(numberOfBarcode = n())"]
F --> G["Filter genes with numberOfBarcode > number_barcode"]
G --> H["Return filtered table (median-based hits)"]
B -- "mean" --> I["Group rows by Gene"]
I --> J["Filter rows with Zscore < mean(Zscore)"]
J --> K["dplyr::group_by(Gene)"]
K --> L["dplyr::reframe(numberOfBarcode = n())"]
L --> M["Filter genes with numberOfBarcode > number_barcode"]
M --> N["Return filtered table (mean-based hits)"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
find_zscore_hit(), the switch fromsummarise()toreframe()changes the required dplyr version and grouping behavior; if the intention is to keep the same grouped output structure as before, consider explicitly checking/setting grouping or stick withsummarise()for compatibility. - The
find_robust_zscore_hit mediantest intest-statistics.Ris now fully commented out; if it is intentionally deprecated it may be clearer to remove it entirely or add a brief comment explaining why it is disabled. - The tests now mix
ggplot2::is_ggplot()andinherits(..., "ggplot")for plot checks; consider standardizing on one approach across the test suite for consistency.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `find_zscore_hit()`, the switch from `summarise()` to `reframe()` changes the required dplyr version and grouping behavior; if the intention is to keep the same grouped output structure as before, consider explicitly checking/setting grouping or stick with `summarise()` for compatibility.
- The `find_robust_zscore_hit median` test in `test-statistics.R` is now fully commented out; if it is intentionally deprecated it may be clearer to remove it entirely or add a brief comment explaining why it is disabled.
- The tests now mix `ggplot2::is_ggplot()` and `inherits(..., "ggplot")` for plot checks; consider standardizing on one approach across the test suite for consistency.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Update plotting tests and z-score hit computation to be compatible with current ggplot2 and dplyr behavior, and adjust examples and tests accordingly.
Enhancements:
Documentation:
Tests: