You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Critical bugs allow strongly contradicted CN calls to survive reliability filtering and can alter inferred sex by treating masked depth as evidence of absence.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Reliability scoring can let contradicted or unsupported calls pass filtering, while treating filtered depth as observed absence can produce incorrect sex inference.
When baf_only = TRUE, both HMM callers pass mu = NULL, but this formula still credits depth because depth defaults to 1. A window with no heterozygous BAF support can therefore score up to 0.9 * post_max and pass the default 0.5 filter when neighbouring windows make its posterior confident. Include the depth fallback only when has_z is true.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
BAF-only reliability scoring treats unmodeled depth as supporting evidence, allowing windows with neither local BAF support nor modeled depth evidence to pass the default filter.
No open issues 🎉
4 previously missed issues
In code that hasn't changed since last review
Exclude unmodeled depth from BAF-only scoring
R/cn_reliability.R:213
When baf_only = TRUE, both HMM callers pass mu = NULL, but depth remains 1 here and still contributes through the depth fallback in the final formula. A window with no heterozygotes and a smoothed posterior of 0.99 therefore scores 0.891 and passes the default filter despite having neither local BAF support nor modeled depth evidence. Disable the depth contribution when depth was not modeled, rather than treating an unavailable depth check as perfect support.
Raise minimum dplyr version to 1.1.1
DESCRIPTION:40
The new relationship = "many-to-many" join in plot_karyotype() requires dplyr 1.1.1, but this constraint still permits 1.1.0. With that permitted version, plotting fails because the join does not accept relationship. Please raise the minimum to 1.1.1, where this argument was introduced (https://opensource.posit.co/blog/2023-03-22_dplyr-1-1-1/).
Apply the coverage rule in non-sex-aware plots
R/filter_hmm_CN.R:289
This new coverage rule is not applied by the non-sex-aware classification in compare_cn_track_summary() (R/plots_hmm_results_all_samples.R:520–553), which still classifies chromosomes from any remaining calls. For example, a sample with two fully called CN4 chromosomes and a third chromosome retaining only a small CN6 window is now euploid in count_types() but aneuploid in the population plot; filter_type consequently selects different samples. Apply the same coverage rule in the plot, preferably by sharing the classification path for both sex-aware and ordinary samples.
Handle all-masked windows before karyotype notation
R/filter_hmm_CN.R:302
For a sex-aware result without by_marker, if every window is masked, kn_df remains NULL: the fallback only constructs it when a nonmissing call exists. Passing it to karyotype_notation() then fails at rep("autosome", nrow(df)), rather than leaving the samples unclassified. Please handle the no-calls case before invoking notation, returning an empty classification with the usual result schema.
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
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.
No description provided.