Skip to content

Enable different set of bolds for each session in TransmitLong#376

Open
sivcek wants to merge 1 commit intomasterfrom
transmit-long-flexible-fmri
Open

Enable different set of bolds for each session in TransmitLong#376
sivcek wants to merge 1 commit intomasterfrom
transmit-long-flexible-fmri

Conversation

@sivcek
Copy link
Copy Markdown
Contributor

@sivcek sivcek commented Jan 4, 2026

Currently TransmitBiasLong assumes that all the sessions have the exact same set of fMRI images. This often is not the case in longitudinal datasets. This PR enables specifying different set of fMRI images for each session while keeping backward compatibility with old behavior. If a user desires to specify different set of fMRI images for each session, they list fMRI names for each session in the --pt-fmri-names argument, separating sessions with % character. If no % character is present, the same set of fMRI names is used for all sessions. If % character is present, the code checks whether the number of fMRI sets match the number of sessions, and uses the sets in the same order as the sessions are listed.

In the example:

--sessions="session1@session2@session2" \
--pt-fmri-names="rest@taskA@taskB%rest@taskA%rest@taskB"

the pairings are:

  • session1rest, taskA, and taskB,
  • session2rest, taskA
  • session3rest, taskB

Copy link
Copy Markdown
Contributor

@glasserm glasserm left a comment

Choose a reason for hiding this comment

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

This looks fine to me.

@mharms
Copy link
Copy Markdown
Contributor

mharms commented Jan 5, 2026

Just an observation that my initial thought is that we'd want to use @ in this type of situation to consistently represent the delimiter between sessions (as used in --sessions), and then introduce the 2nd delimiter to distinguish the different fMRI runs within a session, e.g.
--pt-fmri-names="rest%taskA%taskB@rest%taskA@rest%taskB"
but I see that @sivcek's implementation is consistent with how we treat the addition of a 2nd delimiter in DeDriftAndResamplePipeline.sh

So, the heuristic that we've adopted instead is that @ is always the innermost delimiter, even if that means it delimits sessions in one flag, but runs in a different flag within the same script.


#PseudoTransmit-specific. Should be the same as in the corresponding cross-sectional calls.
opts_AddOptional '--pt-fmri-names' 'fMRINames' 'rfMRI_REST1_LR@rfMRI_REST1_RL...' "fmri runs to use SE/SBRef files from, separated by @"
opts_AddOptional '--pt-fmri-names' 'fMRINames' 'rfMRI_REST1_LR@rfMRI_REST1_RL...' "fmri runs to use SE/SBRef files from, separated by @. For per-session lists, separate session-specific sets using % (e.g., run1@run2%run2%run1@run3)."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
opts_AddOptional '--pt-fmri-names' 'fMRINames' 'rfMRI_REST1_LR@rfMRI_REST1_RL...' "fmri runs to use SE/SBRef files from, separated by @. For per-session lists, separate session-specific sets using % (e.g., run1@run2%run2%run1@run3)."
opts_AddOptional '--pt-fmri-names' 'fMRINames' 'rfMRI_REST1_LR@rfMRI_REST1_RL...' "fmri runs to use SE/SBRef files from, separated by @. For per-session lists, separate session-specific sets using % (e.g., run1@run2%run2%run1@run3 to use run1 and run2 from session1, run2 from session2, and run1 and run3 from session3)."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested a bit more wording to make the example very explicit.

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