Closed ravisanjana closed 2 years ago
Possibly empty labels? Can you look at nibabies_wf/single_subject_1034_wf/func_preproc_ses_newborn_task_restPA_run_01_wf/subcortical_mni_alignment_wf/vol_label/mapflow/_vol_label5/vol0005_flirt_maths_labels.nii.gz
with freeview or something?
Ah yes, I opened it with Freeview and looks like it is empty!
My guess is something is going wrong when resampling to MNIInfant
.
Can you share some screenshots of the following:
# BOLD resampled to MNI Infant template
nibabies_wf/single_subject_01_wf/func_preproc_.../bold_std_trans_wf/_std_target_MNIInfantcohort-1.cohort1/merge/vol0000_xform-00000_merged.nii.gz
# subcortical segmentations resampled to MNI Infant template
nibabies_wf/single_subject_01_wf/func_preproc_.../subcortical_rois_wf/refine_bold_rois/aseg_trans_labels.nii.gz
Here are some screenshots of each:
Hm, the BOLD -> MNIInfant resampling does not look very good. Did this subject undergo any distortion correction?
Has this problem come up across multiple subjects?
I think I'm having the same issue; errors on all create_dtseries5 nodes and empty files for label 5 (I believe this is BRAIN_STEM?)
Have tested on both:
--derivatives
with precomputed T1w segmentation and mask, both of which look fine overlaid on the input T1w.--cifti-output 91k
is omitted.anat dir contains 1 T1w and 1 T2w fmaps are PEpolar func data are multiecho
Run command to docker/derivatives build, with precomputed derivatives:
singularity run --cleanenv -B ~/Documents/license.txt:/license.txt -B <...>/bids/derivatives:/derivatives -B <...>/bids/nibabies_me_input:/input -B <...>/bids/nibabies_out:/out -B <...>/bids/nibabies_wd:/wd <...>/nibabies-21.0.2_derivatives2.sif --fs-license-file /license.txt --mem 180000 --omp-nthreads 8 --nprocs 8 --derivatives /derivatives/precomputed --cifti-output 91k --age-months 2 -w /wd /input /out participant
@madisoth is this error occurring consistently for that subject? If so, is it available on the shared box to debug with?
I believe @ericfeczko mentioned the dcan-infant-pipeline would also run into this in cases where some of the ROIs were essentially empty files. We probably should increase the fault tolerance of this to allow for this, although I have a slight concern that it could cause further errors to go undetected.
@mgxd That's correct -- there are soft failures in the JLF algorithm, which turn into hard failures during the subcortical realignment to the atlas.
My advice would be to provide a message that a given segmentation is null or empty and prompt investigation of the suspect segmentation from JLF. Soft failures for JLF may go beyond simply a missing label.
@ericfeczko @mgxd Can someone elaborate on why JLF is running if @madisoth is feeding in an external segmentation?
My bad, I misread his initial question.
@mgxd, this is probably not related to the same issues we get with dcan-infant-pipeline then.
Thanks all for your responses, @mgxd I just uploaded the input and output directory to Box. I can also upload files from the work directory if needed.
From a quick check of the FreeSurfer output, aparc+aseg looks okay but the white surface is placed such that that none of the BRAIN_STEM ROI is contained within.
The error has happened 3 out of 3 times I have tried running this subject with --cifti-output 91k
, twice with the derivatives branch build (both with and without using --derivatives
) and once on the main branch unstable build.
It did process fine with the DCAN infant-abcd-bids-pipeline using its T2w-based JLF option (with tedana 0.0.11 used to combine the multiecho functional data prior to running).
Okay, I see what's going on here. The brain stem (Label 16 in the FreeSurfer LUT) is actually segmented into its individual structures:
NiBabies should pick up these finer segmentations and relabel them to general brainstem to handle further processing. We will likely need to do this with other brain structures as well.
Thanks for figuring this out @mgxd let us know if/how we can help further :)
Thank you @mgxd for working that out! I noticed those labels 173-175 in my subject but didn't make the connection to why the CIFTI ROI was coming up empty.
This was closed in #186 - we'll monitor to see if any other labels need to be accounted for
I was running nibabies using the docker container and the wrapper script. Here is the command I used:
python3 nibabies_wrapper.py docker /Users/sealab/Documents/nibabies/bids/newborn /Users/sealab/Documents/nibabies/derivatives/newborn participant --age-months 1 --fs-license-file /Applications/freesurfer/7.1.1/license.txt --cifti-output --nprocs 4 -w /Users/sealab/Documents/nibabies/work/newborn
Any idea what went wrong? This is the error from the report:
System information: macOS Big Sur version 11.6 Docker: GB ram, 8 CPUs Nibabies Docker container version: 21.0.1