Potential issue with BIDSjob
This might need double checking but I am pretty sure that for realign and unwarp with VDMs, SPM assumes that the VDMs are co-registered to the very first functional image (or whatever image the reilgnement is done with respect to) and it does not do this coregistration automatically.
From the SPM12 manual in the apply VDM section: "The selected images are assumed to be realigned to the first in the time series (e.g. using Realign: Estimate) but do not need to be resliced. The VDM is assumed to be in alignment with the images selected for resampling (note this can be achieved via the FieldMap toolbox)"
This can be an issue if the fieldmap is acquired after the functional and it becomes even more obvisous if you have multiple sessions, with multiple fieldsmaps (or/and only have a slab of the brain and not whole brain coverage <-- how I realize this could be an issue).
From my reading of the spmup_BIDS job function, this coregistration is not done.
we should then set that if field map then realign to 1st ; simple statement right
note I haven't fully tested all the options, in fact field map so far fail to produce good results - ie messed up that part
Adding here other known issues I have found or that might be problematic in the future:
-
all bold data (task or rest) of one data set are processed through the same pipeline and this might not always make sense (e.g they might have different resolutions): we might need to pass a
taskparameter -
it might make more sense to have:
- one function that only does unpacking (
spmup_BIDS.malso reorients the anatomical and directly calls preprocessing at the end), - one that does preprocessing and
- one that does GLM (
spmup_BIDSjob.mdoes both).
- one function that only does unpacking (
This would be good if only for having a look at the quality checks at every stage.
-
as is the pipeline works this way:
- with no fieldmap --> realign & reslice of EPI + normalization to EPI template (Old Norm) or
- with fieldmap --> realign & unwarp of EPI + normalize EPI using T1 info
I would suspect some people that still want to do ii even with no fieldmap, so ti could be good to make this choice optional.
Also i. causes an error if QA is on because it will try to do QA on the non existing files (e.g normalized anatomical)
sounds very reasonable to separate preprocessing from analysis spmup_BIDS -- we can pass an input parameter that says to do the stats or not; if so it calls another function (which is nicer because can be used independently of the processing)
The PR #10 should take care of all the issues raised here, so it could be closed.