Question about extra preprocessing in containerized version
Opened this issue · 6 comments
Thanks for providing this repo! I am very interested in using it to generate predictions for a fairly large study (currently have around 600 participants).
In our analysis pipeline, the different steps need to be containerized. I am aware that there is a containerized version of brainageR: https://github.com/fprados/brainageR_dockerfile. It looks like the containerized version includes a few extra preprocessing steps: https://github.com/fprados/brainageR_dockerfile/blob/51d9a62146465d033dfca17beaac34f294a1ec5c/brainageR#L60-L63. Why are those included there but not this uncontainerized repo?
Hi,
This is to increase the robustness of the containerized version for any input file. In principle, it shouldn't change the output values because the raw data is untouched. Then, basically the container version should work straightforward with any raw T1 image.
In short:
- Line 60 resets the values of the header to account for unexpected content.
- Line 61 computes the transformation of the input brain to MNI space to ensure the correct orientation for computing brainAge. This is important for avoiding mistakes with very tilted brains or not very AC-PC aligned.
- Line 62 applies the transformation to the header only, without interpolating the image.
- Line 63 sets the same values in the header's sform and qform.
Some variations in the results may occur, but they could stem from differences between Matlab and Octave and other software versions used in the container.
Best,
Ferran
Thanks. Is there a built version of the container that I could test? I'd like to dig into the possibility about differences traceable to Octave or software versions etc.
You can build your own version just downloading the repository and doing:
docker build . -f Dockerfile -t brainimage
You can build your own version just downloading the repository and doing:
docker build . -f Dockerfile -t brainimage
Unfortunately, that's not quite true. There's an outdated link to the spm12 patch (fprados/brainageR_dockerfile#2), and that prevents the current Dockerfile from building. Also, many of the package versions weren't specified (for example, the R packages here), and so there's no guarantee that a new build will have the same versions as the ones that were in the image that was originally tested.