pnlbwh / pnlNipype

PNL pipeline for NIFTI images
Other
10 stars 15 forks source link

fsl_eddy fails to write to cli.NonexistentPath #48

Closed tashrifbillah closed 4 years ago

tashrifbillah commented 4 years ago
Calculating parameter updates
Iter: 4, Total mss = 6.671693
Running sm.ApplyDWILocationReference
Checking shell alignment along PE-direction (running PostEddyAlignShellsAlongPE)
Aligning shells (running PostEddyAlignShells)
Performing final outlier check
Loading prediction maker
Evaluating prediction maker model
Estimated hyperparameters: 1.725002
0.464037
0.982028
2.973424
2.517732
2.254769
2.053862

Failed to open outlier report file /data/pnl/DIAGNOSE_CTE_U01/derivatives/pnlpipe/sub-1032/ses-01/dwi/fsl_eddy_tb571/sub-1032_ses-01_desc-Xc_dwi_Ed.eddy_outlier_report
Running sm.WriteOutlierFreeData
Error: cant open file /data/pnl/DIAGNOSE_CTE_U01/derivatives/pnlpipe/sub-1032/ses-01/dwi/fsl_eddy_tb571/sub-1032_ses-01_desc-Xc_dwi_Ed.eddy_outlier_free_data.nii.gz
EDDY::: Eddy failed with message EDDY:::  ECScanClasses.cpp:::  void EDDY::ECScanManager::WriteOutlierFreeData(const string&, EDDY::ScanType) const:  Exception thrown

Reported by @sbouix and @kniajans

tashrifbillah commented 4 years ago

The reason for this issue is cli.NonexistentPath was never created. It was not discovered so far because:

Solution self.outDir.mkdir() here.

sbouix commented 4 years ago

For some reason when the path existed I also got an error message...

Sent from my iPhone

On Apr 22, 2020, at 5:01 AM, Tashrif Billah notifications@github.com wrote:



    External Email - Use Caution

The reason for this issue is cli.NonexistentPath was never created:

Solution self.outDir.mkdir() herehttps://github.com/pnlbwh/pnlNipype/blob/master/scripts/fsl_eddy.py#L83.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pnlbwh/pnlNipype/issues/48#issuecomment-617649605, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJC74FS3JDAYRWM2MW7SLCLRN2W3PANCNFSM4MNZWHOQ.

The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.

tashrifbillah commented 4 years ago

Hi @sbouix , if the path existed, the program should fail right at the beginning when plumbum module looks for a nonexistent path as a command-line argument. The error that you noticed was from there.

Given the following specification, it was our responsibility to create the directory in the script which I forgot:

    outDir= cli.SwitchAttr(
        ['--out'],
        cli.NonexistentPath,
        help='output directory',
        mandatory=True)
tashrifbillah commented 4 years ago