Issue 71#97
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for filtering rows/columns based on missing values (Issue #71) by introducing explicit missingness operators and wiring them through the Shiny filtering UI, runtime filtering logic, code generation, and test coverage.
Changes:
- Adds new filtering operators:
is_missingandis_not_missing, including UI/operator plumbing and condition spec handling. - Extends the annotation plot logic to render a dedicated “missing vs not missing” plot for missingness filters.
- Adds test coverage for missingness operators across operator application, sample/feature filtering, code generation, and plotting.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/testthat/test-filtering.R |
Adds tests covering missingness operators end-to-end (operator application, filtering, code generation output, and plot behavior). |
R/server_module_filtering_tab.R |
Enables condition specs with NULL values when the operator is a missingness operator; adds operator helpers and missingness handling in apply_filter_operator(). |
R/server_module_filtering_box.R |
Adds missingness operators to the UI, hides the value input for missingness, and introduces missingness-specific plot value mapping and plotting wrapper. |
R/code_generator_processQFeatures.R |
Extends codeGeneratorFiltering() to emit is.na(...) / !is.na(...) conditions for missingness operators. |
Comments suppressed due to low confidence (2)
R/code_generator_processQFeatures.R:399
- The generated code for categorical
!=uses!(x %in% ...), which evaluates toTRUEforNAvalues and therefore keeps missing annotations. In the interactive filtering path, scalar!=producesNAfor missing values which is later coerced toFALSE, so the generated code can diverge from the GUI behavior. Adding an!is.na(...)guard aligns generated code with the filtering semantics and with the new explicit missingness operators.
} else if (condition[[i]]$operator == "!=") {
build_condition <- paste0("!(rowData(se)[[", annotation, "]] %in% ")
vector <- paste0(as_r_vector_literal(condition[[i]]$value), ")")
R/code_generator_processQFeatures.R:462
- Same as the features branch: the generated code for categorical
!=oncolDatawill keepNAvalues because!(NA %in% ...)isTRUE. If missing values should only be included/excluded viais_missing/is_not_missing, add an!is.na(...)guard to keep generated code consistent with runtime filtering.
} else if (condition[[i]]$operator == "!=") {
build_condition <- paste0("!(colData(se)[[", annotation, "]] %in% ")
vector <- paste0(as_r_vector_literal(condition[[i]]$value), ")")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jun 9, 2026
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.
#71