Open wiheto opened 5 years ago
Actually, fmriprep has an ignore flag that works like:
[--ignore {fieldmaps,slicetiming,sbref} [{fieldmaps,slicetiming,sbref} ...]]
So how about it becomes:
--ignore {sub-02,run-3} [{task-test}]
Then all files that are matched in the BIDSLayout filter get removed?
That's a great idea! What do you think @kbonna?
I see two possible solutions of that problem. We can follow @wiheto advice and just filter BIGSGrab output to exclude files for which entity fields meet specified criteria. This is easy. We could also try more complex solution, and check length of all files and discard too short files.
However, I am wondering if dropping just one file, assuming multiple subjects and sessions, won't cause a problem in one of the next interfaces responsible for aggregating results to calculate quality measures. If that is the case, we should first allow for the possibility for single missing file by modifying these places, where files or measures are aggregated. For now, one workaround is to exclude subject by not including him as the argument passed to -participant flag.
I will think about this during the weekend, and then we can come up with the solution.
Ok @kbonna and @kfinc. I won't do anything for now. Let me know if I can help once you think of a solution
However, I am wondering if dropping just one file, assuming multiple subjects and sessions, won't cause a problem in one of the next interfaces responsible for aggregating results to calculate quality measures.
@kbonna I was thinking about this, one way to get around this is to add a -r/--run flag as well when the BIDS filtering is being done. There shouldn't be a problem downstream if files are rejected at the start (i.e. specified by the user).
However, if files are rejected later on based on some metric, then some update to the BIDS layout will be needed.
In very short runs (in my case these runs will be excluded but are still part of the BIDS structure) the Butterworth filter is failing cause there are too few time points.
Unless I am missing something obvious, you can not ignore certain files. Perhaps adding something an
--ignore-file
flag(s) which could be used like:fmridenoise ..... --ignore-file sub-02 run-04
Would exclude all files that match both arguments. Then you could include multiple ignore files:
fmridenoise ...... --ignore-file sub-02 run-04 --ignore-file sub-04 task-rest --ignore-file task-test
Not sure if this is the best way to implement it but if it sounds ok, I can have a go at implementing it, because its something I need.
Crash report: