/
Error when running a pipeline with optional files

This is a collaborative space. In order to contribute, send an email to maximilien.chaumon@icm-institute.org
On any page, type the letter L on your keyboard to add a "Label" to the page, which will make search easier.

Error when running a pipeline with optional files

The Apps created as part of the MEEG Brainlife project are supposed to be run one after another (see How to run Apps one after another). Thus the output of an App will be the input of another.

To test how it works, I decided to apply app-bad-channels and then app-maxfilter

First attempt

  • app-bad-channels: no optional files present in file mapping

  • app-maxfilter: no optional files listes in file mapping

Result: it works fine

 

Second attempt

  • app-bad-channels: optional files present in file mapping

  • app-maxfilter: optional files present in file mapping

Result: app-bad-channels works but app-maxfilter failed:

OSError: trans file "../60618e5b750389e448ebecd7/out_dir_bad_channels/destination.fif" not found

The optional file is indeed not in out_dir_bad_channels.

Indeed, the app-maxfilter takes in input the files corresponding to the datatype meg/fif present in out_dir_bad_channels, but here only meg.fif is in this folder.

 

How to address this issue

The only way to solve this issue is to save in the output directory the files you want to use as optional inputs of the next App. So here, the destination file must be saved in out_dir_bad_channels.

To do so, we add the following line to the helper.py (see Create a helper.py file) for each optional file:

shutil.copy2(calibration_file, 'out_dir_bad_channels/calibration_meg.dat')

 

Related content

Error when an optional file is not available in a dataset
Error when an optional file is not available in a dataset
More like this
Create a helper.py file
Create a helper.py file
More like this
How to run Apps one after another
How to run Apps one after another
More like this
app-head-pos
app-head-pos
More like this
Où stocker l'information "bad channels"
Où stocker l'information "bad channels"
More like this
Structure of configuration file generated by BL
Structure of configuration file generated by BL
More like this