Skip to content

Commit

Permalink
Save SIFT2 mu parameter
Browse files Browse the repository at this point in the history
Currently the SIFT2 mu parameter is connected to mu in the outputnode, but is never written. Given that this is a necessary correction factor when using sum of streamlines connectomes after SIFT2, this will write the mu parameter to the derivatives folder.
  • Loading branch information
araikes committed Jul 9, 2024
1 parent 555556c commit 82fffac
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion qsiprep/workflows/recon/mrtrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def init_mrtrix_tractography_wf(
name="inputnode",
)
outputnode = pe.Node(
niu.IdentityInterface(fields=["tck_file", "sift_weights", "recon_scalars"]),
niu.IdentityInterface(fields=["tck_file", "sift_weights", "mu", "recon_scalars"]),
name="outputnode",
)

Expand Down Expand Up @@ -588,6 +588,18 @@ def init_mrtrix_tractography_wf(
run_without_submitting=True,
)
workflow.connect(outputnode, 'sift_weights', ds_sift_weights, 'in_file') # fmt:skip
if qsirecon_suffix:
ds_mu_file = pe.Node(
ReconDerivativesDataSink(
extension=".txt",
model="sift2",
suffix="mu",
qsirecon_suffix=qsirecon_suffix,
),
name="ds_mu_file",
run_without_submitting=True,
)
workflow.connect(outputnode, 'mu', ds_mu_file, 'in_file') # fmt:skip
if use_5tt:
workflow.connect(inputnode, connect_5tt, tck_sift2, "act_file") # fmt:skip

Expand Down

0 comments on commit 82fffac

Please sign in to comment.