clean up target rules, check stains for all subjects#92
Merged
Conversation
Member
akhanf
commented
Dec 19, 2025
- now checks all stains over all subjects to make sure they are consistent (before only used first subject to define workflow targets)
- only run coloc when more than one stain
- now checks all stains over all subjects to make sure they are consistent (before only used first subject to define workflow targets) - only run coloc when more than one stain
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors target rules and improves stain consistency validation across subjects in the SPIMquant workflow. The changes ensure that all subjects have consistent stains before processing and conditionally enables colocalization analysis only when multiple stains are present.
Key Changes
- Adds a
get_stains_all_subjects()function to validate that all subjects have the same stains, replacing the previous approach that only checked the first subject - Implements conditional logic to run colocalization analysis (
do_coloc) only when multiple stains are detected - Updates all file extensions from
.niito.nii.gzthroughout the workflow for compressed NIfTI files
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| spimquant/workflow/Snakefile | Implements stain consistency checking, adds conditional coloc logic, refactors target rules, and updates file extensions to .nii.gz |
| spimquant/workflow/rules/common.smk | Adds new get_stains_all_subjects() function to validate stain consistency across subjects |
| spimquant/workflow/rules/segmentation.smk | Adds conditional rule logic for single stain case to avoid coloc processing, updates file extensions |
| spimquant/workflow/rules/templatereg.smk | Updates all file suffixes from .nii to .nii.gz for compressed NIfTI format |
| spimquant/workflow/rules/masking.smk | Updates file suffixes to .nii.gz for consistency |
| spimquant/workflow/rules/import.smk | Updates file suffix to .nii.gz |
| spimquant/workflow/rules/groupstats.smk | Updates file suffixes to .nii.gz |
| spimquant/config/snakebids.yml | Updates target rule names to all_participant and all_group |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Co-authored-by: akhanf <11492701+akhanf@users.noreply.github.com>
Replace equality comparison with identity comparison for None checks
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.