neurospin / pypreprocess

Preprocessing scripts for neuro imaging
105 stars 66 forks source link

pure python preprocessing fails on realignment. Weird temporary file ravol_0 #152

Open MartinPerez opened 9 years ago

MartinPerez commented 9 years ago

[Memory] Calling pypreprocess.realign.MRIMotionCorrection.transform... transform(reslice=False, prefix='ra', basenames=['bold.nii.gz', 'bold.nii.gz', 'bold.nii.gz'], ext=None, output_dir='/volatile/martin_local/open_source_contributions/pypreprocess/test_tmp_data/preprocpython/ds001/sub001/tmp') ...done; output saved to /volatile/martin_local/open_source_contributions/pypreprocess/test_tmp_data/preprocpython/ds001/sub001/tmp. ...done; output saved to /volatile/martin_local/open_source_contributions/pypreprocess/test_tmp_data/preprocpython/ds001/sub001/tmp. ...done; output saved to /volatile/martin_local/open_source_contributions/pypreprocess/test_tmp_data/preprocpython/ds001/sub001/tmp. Persisting in /volatile/martin_local/open_source_contributions/pypreprocess/test_tmp_data/preprocpython/ds001/sub001/cache_dir/joblib/pypreprocess/realign/MRIMotionCorrection/transform/eaac9fb96e8f748c15cde66972654dd0 ____transform - 3.3s, 0.1min

Hardlinked test_tmp_data/ds001/sub001/anatomy/highres001.nii.gz -> /volatile/martin_local/open_source_contributions/pypreprocess/test_tmp_data/preprocpython/ds001/sub001/highres001.nii.gz ...

OSError Traceback (most recent call last) /usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in execfile(fname, where) 202 else: 203 filename = fname --> 204 builtin.execfile(filename, where)

/volatile/martin_local/open_source_contributions/pypreprocess/examples/openfmri_preproc_purepython.py in () 74 dartel=options.dartel, 75 delete_orient=options.delete_orient, ---> 76 n_jobs=options.n_jobs) 77 78 print "\r\nAll output written to %s" % output_dir

/volatile/martin_local/open_source_contributions/pypreprocess/pypreprocess/openfmri.py in preproc_dataset_purepython(data_dir, output_dir, ignore_subjects, restrict_subjects, delete_orient, dartel, n_jobs) 249 coregister=True, stc=True, 250 tsdiffana=True, realign=True, --> 251 report=True, reslice=True)

/volatile/martin_local/open_source_contributions/pypreprocess/pypreprocess/purepython_preproc_utils.pyc in do_subject_preproc(subject_data, caching, stc, ref_slice, interleaved, slice_order, realign, coregister, coreg_func_to_anat, tsdiffana, fwhm, write_output_images, concat, report, parent_results_gallery, shutdown_reloaders, reslice) 336 caching=caching, write_output_images=write_output_images, 337 func_prefix=func_prefix, --> 338 func_basenames=func_basenames, report=report) 339 340 ###################

/volatile/martin_local/open_source_contributions/pypreprocess/pypreprocess/purepython_preproc_utils.pyc in _do_subject_realign(subject_data, reslice, register_to_mean, caching, hardlink_output, ext, func_basenames, write_output_images, report, func_prefix) 99 100 if write_output_images > 1: --> 101 subject_data.hardlink_output_files() 102 103 return subject_data

/volatile/martin_local/open_source_contributions/pypreprocess/pypreprocess/subject_data.pyc in hardlink_output_files(self, final) 463 if not filename is None: 464 linked_filename = hard_link( --> 465 filename, self.session_output_dirs[sess]) 466 tmp.append(linked_filename) 467 if final:

/volatile/martin_local/open_source_contributions/pypreprocess/pypreprocess/io_utils.pyc in hard_link(filenames, output_dir) 577 return hardlinked_filenames[0] 578 else: --> 579 return [hard_link(_filenames, output_dir) for _filenames in filenames] 580 581

/volatile/martin_local/open_source_contributions/pypreprocess/pypreprocess/io_utils.pyc in hard_link(filenames, output_dir) 560 continue 561 if not os.path.isfile(src): --> 562 raise OSError("src file %s doesn't exist" % src) 563 564 # unlink if link already exists

OSError: src file /volatile/martin_local/open_source_contributions/pypreprocess/test_tmp_data/preprocpython/ds001/sub001/tmp/ravol_0 doesn't exist

kingjr commented 5 years ago

Same issue here @MartinPerez did you find a way to solve it by any chance?

bthirion commented 5 years ago

You may want to use git@github.com:dohmatob/pyaffineprep.git instead. It contains the sume Pythone routine, possibly with less overhead. HTH

On 14/07/2019 14:50, Jean-Rémi KING wrote:

Same issue here @MartinPerez https://github.com/MartinPerez did you find a way to solve it by any chance?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/neurospin/pypreprocess/issues/152?email_source=notifications&email_token=AABZHVTPIAWGOCBDKOS7P43P7MOKTA5CNFSM4BM6AU5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ4EW3A#issuecomment-511200108, or mute the thread https://github.com/notifications/unsubscribe-auth/AABZHVT4VIBQCYENDFOUWZ3P7MOKTANCNFSM4BM6AU5A.

kingjr commented 5 years ago

Thanks @bthirion