I am trying to get fmriprep-docker wrapper to run. I followed the instructions on the fmriprep readthedocs to run the docker container. I was able to get the pip install --user --upgrade fmriprep-docker to run. (Command line output below). However when I try to run the next step fmriprep-docker /Users/franklinfeingold/Desktop/BIDS_NKI_walkthrough/Nifti /Users/franklinfeingold/Desktop/BIDS_NKI_walkthrough/derivatives sub-2475376. However, the fmriprep-docker command cannot be found. I am able to run fmriprep through docker using my own crafted docker call, but would like to try and get the wrapper to work as well. I have the dependencies installed (i.e. Docker, python) Thank you!
This might have to do with which Python environment it installed into. Itās hard to say without knowing more about your system, but one suggestion would be to create a Conda environment and install fMRIPrep-docker within that activated environment. Then you can be more certain itās calling the right Python (i.e., the output of which python should trace back to that environment).
Thank you for your quick response! I was digging deeper, and yup! One has to make sure everything is all up to date (I used Python 3.7, I am not sure if 3.0 would work, may recommend sticking to 3.7, reduce risks). The (possible) automatic alias (so you can call directly the fmriprep-docker) wouldnāt work, I had to go directly into the folder where it was download, chmod 775 (or +x) the .py script and then it would run. One last little quirk was the participant label doesnāt like my sub-2475376 participant tag, thoughts on what may be happening there?
Just tried dropping the āsubā prefix and it still didnāt like it. It appears it may be just a place holder? It gives just a choice of āparticipantā in the command so maybe fmriprep_docker.py will grab the right subject? (If there are multiple not sure how it would handle that, my current test set just has 1). Other calls with fmriprep_docker.py has the consistent participant tag there too so that is curious. If I kept it as just participant it will start running so I am not sure. Thank you for your quick help!
That sounds good - I will just use participant then. Though, I am concerned of how it scales for more subjects and deciding who to run it on (all of them? if so, the storage issues will creep really quickly if that is the case). This should at least get me moving in a good direction! Thank you again for the quick help!
So you always use participant (itās the only analysis level fMRIPrep has), and you specify the ones you want with --participant-label. And you donāt need the sub- prefix (though we do allow it because so many users made this mistake, we decided to just fix it for them).
I think that the main obstacle I tackled when I first tried to use this option was that in the āhelpā the order of the options was reversed, at least in former versions (the ordered arguments were shown last while they must be first).
Where is this behavior documented ? In the help for the fmriprep-docker wrapper, thereās no mention that you can pass along additional arguments from fmriprep. Unless Iām missing the reference ?
I donāt usually use the wrapper, so perhaps itās known behavior Iāve just missed.
Fair point. Thatās poorly documented. The whole point of the wrapper was to be called just like fmriprep, and translate it to the correct docker invocation, with all the mounting done for you.
Just as an aside, itās a little more complicated than that. Both the exact semantics of interpreting order of arguments and their positions in the help text are quirks of the argument parser, and not (AFAIK tweakable by us). It is possible to write the positional arguments at the end, if you choose to put in the effort, but putting them first means never having to think about those semantics, which is why I do it, personally.
Thank you @effigies, @emdupre and @brai for your clarifications and help! This all makes a lot of sense! I am writing up a fmriprep tutorial using this wrapper call so this great information will be integrated into that step