Update spot_detection_2d: Add local_max detection method#220
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reintroduces the local_max spot detection method for the spot_detection_2d Galaxy tool (previously removed in #132), updates the wrapper to pass parameters via a config JSON, adds input validators for 2-D single-channel images, and refreshes test fixtures/dependency pins.
Changes:
- Add
local_max(“Gaussian filtering”) detection method and wire it through the tool wrapper + Python implementation. - Refactor wrapper invocation to use
giatools.ToolBaseplatestyle--paramsJSON and add validators for 2-D/single-channel inputs. - Update requirements and add/refresh test datasets and regression tests.
Reviewed changes
Copilot reviewed 4 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/spot_detection_2d/spot_detection_2d.xml | Adds local_max option, validators, JSON-param config, updated requirements, and new/updated tests. |
| tools/spot_detection_2d/spot_detection_2d.py | Implements local_max_detector, refactors detection dispatch, and switches CLI to ToolBaseplate. |
| tools/spot_detection_2d/validators.xml | Imports shared validator macros used to reject non-2D / multi-channel inputs. |
| tools/spot_detection_2d/test-data/input1_tyx.tsv | Updated expected TSV output for multi-frame test. |
| tools/spot_detection_2d/test-data/input2_yx.tsv | Updated expected TSV output for single-frame test. |
| tools/spot_detection_2d/test-data/input2_yx.tiff | New/updated single-frame test image fixture. |
| tools/spot_detection_2d/test-data/input3_tyx.tsv | Added expected TSV output for local_max regression test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Re-implement the
local_maxdetection method that detects local intensity maxima and was removed in #132. Note that the original results are reproduced if the intensity coordinate offset is set to –1/–1.The PR also migrates from 1-based to 0-based indexing of the frames. This is to establish consistency with the "Starting time point" and "Ending time point" fields. Before this PR, the "Ending time point" was actually a time delta that was subtracted from the end of the sequence, instead of being a time point. With 0-based indexing, consistent slicing of the stack is easier to establish.
The PR also updates the dependency versions.
Check-list for the contributor
Mandatory checks:
If this PR adds or updates a tool or tool collection:
Guidelines for the contributor
This section is cited from the Naming and Annotation Conventions for Tools in the Image Community in Galaxy.
Naming
Generally, the name of Galaxy tools in our community should be expressive and concise, while stating the purpose of the tool as precisely as possible. Consistency of the namings of Galaxy tools is important to ensure they can be found easily. To maintain consistency, we consider phrasing names as imperatives a good practice, such as "Analyze particles" or "Perform segmentation using watershed transformation". An acknowledged exception from this rule is the names of tool wrappers of major tool suites, where the name of a tool wrapper should be chosen identically to the module or function of the tool which is wrapped (e.g., "MaskImage" in CellProfiler).
Tool description
If a Galaxy tool is a thin tool wrapper (e.g, part of a major tool suite), then the name of the wrapped tool (and only the name of the wrapped tool, subsequent to the term "with" as in "with Bioformats") should be used as the description of the tool (further examples include "with CellProfiler", "with ImageJ2", "with ImageMagick", "with SpyBOAT", "with SuperDSM"). This ensures that the tool is found by typing the name of the wrapped tool into the "Search" field on the Galaxy interface. The tool description should be empty if a tool is either not part of a major tool suite, or the main functionality of the tool is implemented in the wrapper.
Annotations
We point out that there is a global list of precedential annotations with Bio.tools identifiers (Ison et al., 2019) in Galaxy (see mappings), which may outweigh the annotations made in the XML specification of a Galaxy tool (and thus the annotations of a tool reported within the web interface of Galaxy might be divergent). However, since the precedential annotations are subject to possible changes and to avoid redundant work, we do not aim to reflect those in our specifications (those which we make in the XML specifications of Galaxy tools).