Skip to content

Brain tissue segmentation fmriprep wrong labelling for few subjects #431

Open
@emvdmeijden

Description

@emvdmeijden

Describe the bug
I am running fmriprep on resting state fmri data of 7 year olds. By now, I have ran fmriprep for 28 subjects, all finished successfully (without errors). However, the HTML reports of 3 subjects show incorrect labelling of brain tissue segmentation of the T1w. The segmentation looks good, but WM/GM border is depicted in magenta, while magenta is supposed to mark the tissue/CSF border. I have added a screenshot below of one of the subjects with wrong labelling and one where labelling is correct (for comparison).

The input for all subjects is the same so I cannot figure out what is going wrong for these few subjects.

Inputs:

  • anat: sub-*_T1w.nii.gz (not brain extracted)
  • fmap: sub-_dir-j-_epi.json, sub-_dir-j-_epi.nii.gz, sub-_dir-j_epi.json, sub-_dir-j_epi.nii.gz
  • func: sub-_task-rest_bold.json, sub-_task-rest_bold.nii.gz
  • freesurfer was already ran for all subjects, so I also input freesurfer data and used --fs-no-reconall & --fs-subjects-dir flags

Has anyone encountered this before and knows what could be the problem? Help/advice would be very much appreciated!!

Exact command line executed
I am using NoMachine remote desktop and use SLURM to submit jobs. This is my .slurm script:

#!/bin/sh
#  
#
#
#
#SBATCH --job-name=fmriprep_new
#SBATCH --output=/home/k2371270/fmriprep/logs/%j.out
#SBATCH --error=/home/k2371270/fmriprep/logs/%j.err
#SBATCH --cpus-per-task=2
#SBATCH --mem=20G
module load fmriprep/23.2.0


# set the working variables
working_dir="/home/k2371270/fmriprep"

BIDs_dir="${working_dir}/BIDs"
output_dir="${working_dir}/output/output_new"
work="${working_dir}/work"

#Start of script here

fmriprep \
${BIDs_dir} \
${output_dir} \
participant \
--skip_bids_validation \
--participant_label 001 \
--skull-strip-template MyCustom \
--output-spaces MyCustom:res-1 \
--work-dir ${work} \
--write-graph \
--nthreads 8 \
--omp-nthreads 8 \
--ignore slicetiming \
--fs-no-reconall \
--fs-subjects-dir ${working_dir}/freesurfer \
--fs-license-file ${working_dir}/freesurfer/license.txt \
--clean-workdir \
--mem_mb 32000

Are you positive that the input dataset is BIDS-compliant?

  • [ x] I have used the online BIDS-Validator
  • I have run a local installation of the BIDS-Validator (please, note the version of the validator here).
  • I let sMRIPrep check it for me (in other words, I didn't set the --skip-bids-validation argument).
  • No, I haven't checked myself AND used the --skip-bids-validation argument.

sMRIPrep feedback information
There is no crash report because there were no errors, it's just the output that looks off.

Visual reports of sMRIPrep
Segmentation that has wrong colours/labels:
image

Segmentation of different subject that is correctly labelled:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions