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
Good change — centralizing pyramid/BioFormats extensions into a single .PYRAMID_FORMATS vector (R/utils.R:207-220) is much easier to maintain and extend than the old inline regex in R/ImageArray.R.
Issues found
Unescaped . in extensions creates a false-positive-prone regex — R/ImageArray.R:495-496
pyramid_formats<- paste(paste0(.PYRAMID_FORMATS, "$"), collapse="|")
if (grepl(pyramid_formats, image)) {
Each entry in .PYRAMID_FORMATS (e.g. ".ome.tif") contains a literal . that grepl treats as "match any character" since the string isn't escaped or passed with fixed = TRUE. That means a filename like genome.tif or sample_xafi will also match .ome.tif$ / .afi$ respectively, since . in the pattern absorbs any single character (e.g. n before ome.tif, or x before afi). This bug pre-dates this PR (the original inline pattern had the same issue for .ome.tiff/.ome.tif/.qptiff/.qptif), but this PR both extends it to more extensions (.svs, .afi, .ndpi, .ndpis, .ome.tf2, .ome.tf8, .ome.btf) and centralizes the list — a good opportunity to fix it now, e.g.:
or build the pattern with fixed = TRUE per-extension and combine with any(vapply(...)).
Case sensitivity — some of the newly added formats (e.g. .SVS, .NDPI) commonly appear with uppercase extensions on Windows-originated scanner exports. grepl() here is case-sensitive by default; consider ignore.case = TRUE unless this is intentionally strict.
Vignette typo — vignettes/ImageArray.Rmd:244: "(e.g. qptiff, svs, )." has a dangling comma before the closing parenthesis (should be "(e.g. qptiff, svs).").
Uncertain comments — R/utils.R:218-219 has # CODEX ? next to .qptiff/.qptif, suggesting the format attribution wasn't confirmed. Worth double-checking (qptiff/qptif are actually PerkinElmer/Akoya Vectra "QPTIFF" format, used by CODEX/PhenoCycler pipelines but not CODEX-specific) and tidying the comment before merge.
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.