Sorry in advance if it’s too simple. I am trying to use fsl with nipype. I have built a very simple workflow in jypyter notebook. The workflow basically applies the brain masks on the epi data for skullstripping, as well as smoothing the epi file. When I ran the workflow (with “preproc.run(‘MultiProc’, plugin_args={‘n_procs’: 1})”), it gave me the error that “No command “fslmaths” found on host n#. Please check that the corresponding package is installed.”
In our cluster, if I want to use any fsl command, I need to run “module load fsl” in the command line to load the module. Therefore, I am wondering if there is any way I can load the module when running the workflow through Jypyter Notebook?
Definitely not too simple, we also have centOS installed on our hpc, so we have the module load feature as well.
I toyed around a little, but couldn’t find an easy solution with using the magic %env.
But what you can do is type module load FSLbefore you open the jupyter notebook and it should work.
If you always want the fsl commands when you login to your cluster you can add module load fsl to your ~/.bash_profile (try first) or your ~/.bashrc (if it doesn’t exist you can make one: touch ~/.bashrc)