Skip to content

accommodate new templates from SPIMtemplates workflow#112

Merged
akhanf merged 8 commits intomainfrom
spim-templates
Mar 8, 2026
Merged

accommodate new templates from SPIMtemplates workflow#112
akhanf merged 8 commits intomainfrom
spim-templates

Conversation

@akhanf
Copy link
Member

@akhanf akhanf commented Feb 23, 2026

uses spim_templates dict inside an existing template, with these ones as additional "channels" to the ABAv3 template, since they are generated from data that is already nonlinearly registered to ABAv3..

Note: still working on optimal template estimation in SPIMtemplates, since the template does drift a bit and is also susceptible to initial registration error, so would be good to do this iteratively in FireANTS, e.g. correct the template to push towards the ABAv3.. Also this doesn't have shape_avg enabled, and is greedy not SyN..

uses spim_templates dict inside an exisitng template, with these ones as
additional "channels" to the ABAv3 template, since they are generated
from data that is already nonlinearly registered to ABAv3..

However the template does drift a bit and is also susceptible to initial
registration error, so would be good to do this iteratively in FireANTS,
e.g. correct the template to push towards the ABAv3..
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 PR extends SPIMquant’s Snakemake workflow to optionally use stain-specific “SPIM templates” (generated from SPIMtemplates and already registered to ABAv3) as the registration reference, instead of always using the anatomical template.

Changes:

  • Add spim_templates entries to the ABAv3 template config and select a registration stain from those when available.
  • Add a new import rule to fetch/copy the selected SPIM template channel into the local tpl-{template} space.
  • Update template-path helpers so registration can reference either anat.nii.gz or the selected stain template.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
spimquant/workflow/rules/import.smk Adds import_template_spim rule to import stain-specific SPIM template channels.
spimquant/workflow/rules/common.smk Makes template path selection depend on whether a SPIM template is being used.
spimquant/workflow/Snakefile Adds logic to detect and prefer SPIM templates when available.
spimquant/config/snakebids.yml Adds ABAv3 spim_templates URLs for YoPro and Iba1.

Copy link
Contributor

Copilot AI commented Mar 4, 2026

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

Copilot AI and others added 2 commits March 4, 2026 20:38
…tching stains

Co-authored-by: akhanf <11492701+akhanf@users.noreply.github.com>
Fix stain-for-reg fallback when spim_templates exists but has no matching stains
@akhanf akhanf merged commit 1e7ad1d into main Mar 8, 2026
2 checks passed
@akhanf akhanf deleted the spim-templates branch March 8, 2026 00:56
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.

3 participants