Closed bpinsard closed 4 years ago
Looking at the work-dir I found the problem was in brain_extraction_wf/res_tmpl
, so it was completely independent of the input image.
In fact the problem was the templateflow image being corrupted (truncated).
Any other software is unable to open the image, but surprisingly Ants ResampleImageBySpacing
is able to open and resample it, with a small portion of the image and a lot of zeros in the rest of the volume.
I will rerun the pipeline and see if it fixes the bug.
In fact the problem was the templateflow image being corrupted (truncated).
What do you mean? Can you elaborate more?
I had pre-downloaded the templates (outside of container, with templateflow package) because the cluster nodes don't have access to the internet. Maybe something went wrong with the download? Like it was interrupted.
Here is what the res_tmpl
output looks like with the corrupted input file. Clearly explains why brain extraction failed.
Re-downloaded it now, it looks fine.
@oesteban do you want me to submit an issue to templateflow? Looking at the code, it seems that it checks if the size is zero to determine if it has been fetched. Would a checksum or a file-size check fix that kind of (super rare) issues? Might not be worth it though.
Yes, please do file an issue at https://github.com/templateflow/python-client - checksums sound sensible.
Closing it now, as this is a templateflow (and Ants) issue. Thanks.
I am experiencing lots of problems with freesurfer in fmriprep. Though it might be a freesurfer issues, I know that the pipeline is a bit modified in fmriprep. Also, I have never seen such disastrous results in the past using freesurfer, in particular with quality data (no motion, .8mm iso). Here is what the aseg looks like before the surface reconstruction crashed with segfault.
Other subjects preprocessing completed, but it shows the same problems, others are fine.
Two factors that could play a role here:
Do you have any clue why this fails? I read somewhere that fmriprep had mainly been tested on defaced datasets, but maybe our defacing is breaking the topology of the images (like a watershed step or else).
Would cropping the neck area could help?
Thanks.
What version of fMRIPrep are you using?
20.1.0
What kind of installation are you using? Containers (Singularity, Docker), or "bare-metal"?
singularity
What is the exact command-line you used?
Have you checked that your inputs are BIDS valid?
Yes, it is not, because it relies on BEPS not yet merged, but it is valid for all fmriprep inputs (T1w, T2w, and BOLD).
Did fMRIPrep generate the visual report for this particular subject? If yes, could you share it?
Can you find some traces of the error reported in the visual report (at the bottom) or in crashfiles?
Are you reusing previously computed results (e.g., FreeSurfer, Anatomical derivatives, work directory of previous run)?
no
fMRIPrep log
If you have access to the output logged by fMRIPrep, please make sure to attach it as a text file to this issue.