Skip to content

clean up target rules, check stains for all subjects#92

Merged
akhanf merged 6 commits intomainfrom
clean-targets
Dec 19, 2025
Merged

clean up target rules, check stains for all subjects#92
akhanf merged 6 commits intomainfrom
clean-targets

Conversation

@akhanf
Copy link
Member

@akhanf 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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .nii to .nii.gz throughout 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

akhanf and others added 3 commits December 19, 2025 13:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Dec 19, 2025

@akhanf I've opened a new pull request, #93, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits December 19, 2025 18:35
Co-authored-by: akhanf <11492701+akhanf@users.noreply.github.com>
Replace equality comparison with identity comparison for None checks
@akhanf akhanf merged commit ad92918 into main Dec 19, 2025
2 checks passed
@akhanf akhanf deleted the clean-targets branch December 19, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants