Skip to content

Add support for running group-level command on connectivity matrices#948

Open
HippocampusGirl wants to merge 12 commits intomainfrom
cwas
Open

Add support for running group-level command on connectivity matrices#948
HippocampusGirl wants to merge 12 commits intomainfrom
cwas

Conversation

@HippocampusGirl
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 2, 2026 20:33
Copy link
Copy Markdown

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 adds support for running the group-level command on connectivity (correlation/covariance) matrices by integrating matrix-aware BIDS naming/loading and converting correlation matrices into voxelwise-compatible effect/variance images.

Changes:

  • Add matrix-aware BIDS derivatives mapping for correlation_matrix / covariance_matrix and adjust grouping behavior.
  • Convert subject-level correlation matrices to Fisher z “effect” and corresponding “variance” images for group-level model fitting.
  • Make masks optional throughout group-level fit/export paths and update handling of inconsistent export statistics.

Reviewed changes

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

Show a summary per file
File Description
src/halfpipe/stats/fit.py Allows mask_files to be optional and updates mask/NaN handling during data loading.
src/halfpipe/stats/base.py Modifies map-writing save behavior (but currently introduces a debugger breakpoint and changes save API).
src/halfpipe/result/bids/images.py Adds explicit BIDS mapping for matrix outputs via suffix=matrix + desc=....
src/halfpipe/interfaces/result/make.py Removes composite-attribute expansion logic previously used to split keys like correlation_matrix.
src/halfpipe/cli/commands/group_level/run.py Adds Fisher z transform step producing effect/variance NIfTIs from correlation matrices prior to aggregation/fitting.
src/halfpipe/cli/commands/group_level/export.py Makes mask optional for export and changes how inconsistent statistics across subjects are handled.
src/halfpipe/cli/commands/group_level/design.py Allows connectivity-matrix inputs to pass filtering (correlation_matrix added).
src/halfpipe/cli/commands/group_level/between.py Treats masks as optional and avoids adding missing masks to metadata.sources.
src/halfpipe/cli/commands/group_level/base.py Adds correlation_matrix -> effect alias in group-level image key normalization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/halfpipe/stats/base.py Outdated
Comment thread src/halfpipe/stats/base.py Outdated
Comment thread src/halfpipe/cli/commands/group_level/run.py Outdated
Comment thread src/halfpipe/cli/commands/group_level/run.py Outdated
Comment thread src/halfpipe/cli/commands/group_level/run.py Outdated
Comment thread src/halfpipe/cli/commands/group_level/run.py Outdated
Comment thread src/halfpipe/interfaces/result/make.py
Comment thread src/halfpipe/result/bids/images.py
Comment thread src/halfpipe/cli/commands/group_level/run.py Outdated
Copy link
Copy Markdown

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

Copilot reviewed 24 out of 24 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/halfpipe/xdf.py
Comment thread src/halfpipe/xdf.py
Comment thread src/halfpipe/cli/commands/group_level/connectivity.py
Comment thread src/halfpipe/result/bids/images.py Outdated
Comment thread src/halfpipe/xdf.py
Comment thread src/halfpipe/xdf.py Outdated
Comment thread src/halfpipe/utils/lock.py
Comment thread src/halfpipe/cli/commands/group_level/run.py
Comment thread src/halfpipe/stats/base.py
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