Skip to content

Commit

Permalink
rpe_all bug fix: consistent naming for eddy scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenny Chen authored and Jenny Chen committed Dec 13, 2024
1 parent 9043865 commit 6cc0fc7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions lib/designer_func_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,15 +906,18 @@ def run_eddy(shell_table, dwi_metadata):
'topup_corrected_brain'))

run.command('mrcat -axis 3 working.mif dwirpe.mif dwipe_rpe.mif')

if app.ARGS.eddy_fakeb is None:
run.command('dwifslpreproc -nocleanup -eddy_options %s -rpe_all -pe_dir "%s" -eddy_mask "%s" dwipe_rpe.mif dwiec.mif' %
(eddyopts,
run.command('dwifslpreproc -nocleanup -scratch "%s" -eddy_options %s -rpe_all -pe_dir "%s" -eddy_mask "%s" dwipe_rpe.mif dwiec.mif' %
('eddy_processing',
eddyopts,
pe_dir,
'topup_corrected_brain_mask' + fsl_suffix
))
else:
run.command('dwifslpreproc -nocleanup -grad "%s" -eddy_options %s -rpe_all -pe_dir "%s" -eddy_mask "%s" dwipe_rpe.mif dwiec.mif' %
('fakeb_grad.txt',
run.command('dwifslpreproc -nocleanup -scratch "%s" -grad "%s" -eddy_options %s -rpe_all -pe_dir "%s" -eddy_mask "%s" dwipe_rpe.mif dwiec.mif' %
('eddy_processing',
'fakeb_grad.txt',
eddyopts,
pe_dir,
'topup_corrected_brain_mask' + fsl_suffix
Expand All @@ -923,11 +926,11 @@ def run_eddy(shell_table, dwi_metadata):

elif app.ARGS.rpe_header:
if app.ARGS.eddy_fakeb is None:
cmd = ('dwifslpreproc -nocleanup -eddy_options %s -rpe_header working.mif dwiec.mif' %
(eddyopts))
cmd = ('dwifslpreproc -nocleanup -scratch "%s" -eddy_options "%s" -rpe_header working.mif dwiec.mif' %
('eddy_processing',eddyopts))
else:
cmd = ('dwifslpreproc -nocleanup -grad "%s" -eddy_options %s -rpe_header working.mif dwiec.mif' %
('fakeb_grad.txt', eddyopts))
cmd = ('dwifslpreproc -nocleanup -scratch "%s" -grad "%s" -eddy_options %s -rpe_header working.mif dwiec.mif' %
('eddy_processing','fakeb_grad.txt', eddyopts))
run.command(cmd)

elif not app.ARGS.rpe_header and not app.ARGS.rpe_all and not app.ARGS.rpe_pair:
Expand Down

0 comments on commit 6cc0fc7

Please sign in to comment.