Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wagner Lab Use Case - Poor Brain Mask #2399

Closed
alitrelle opened this issue Apr 19, 2021 · 6 comments
Closed

Wagner Lab Use Case - Poor Brain Mask #2399

alitrelle opened this issue Apr 19, 2021 · 6 comments

Comments

@alitrelle
Copy link

We are using fMRIPrep to preprocess fMRI data from a sample of older adults. For a number of subjects the EPI brain mask is inaccurate, and the accuracy of the mask often varies considerably from run to run. Any advice for how to improve the accuracy and reliability of this step would be very much appreciated!

What version of fMRIPrep are you using?

We are using fmriprep v20.2.1, run via Singularity on Sherlock, and used the following command:

/usr/local/miniconda/bin/fmriprep /oak/stanford/groups/awagner/AM/FMRIPREP/trimmed_data /oak/stanford/groups/awagner/AM/FMRIPREP/trimmed_data/derivatives/fmriprep-20.2.1 participant --participant-label 125
-w /work/ -vv --omp-nthreads 8 --nthreads 12 --mem_mb 30000 --skip_bids_validation --fs-license-file /home/users/atrelle/freesurfer.txt --skull-strip-t1w force --dummy-scans 5 --fd-spike-threshold 0.9 --dvars-spike-threshold 3.0 --output-spaces MNI152NLin2009cAsym:res-2 anat fsnative fsaverage5

The subjects are BIDS valid, run without error, and are using previously computed FreeSurfer outputs.

Reports can be found at /oak/stanford/groups/awagner/AM/FMRIPREP/trimmed_data/derivatives/fmriprep-20.2.1/fmriprep/${subject}/

See examples of outputs for some impacted subjects (sub-020, sub-030, sub-125) below:

Screen Shot 2021-04-16 at 1 04 33 PM

Screen Shot 2021-04-19 at 3 02 01 PM

Screen Shot 2021-04-16 at 11 59 56 AM

@alitrelle alitrelle added the bug label Apr 19, 2021
@julfou81
Copy link
Contributor

julfou81 commented May 6, 2021

Hi,

Isn't the mask calculated from the T1w image and projected back to the bold space? Maybe there is an issue with the bold-to-T1w registration? Perhaps using the option --bold2t1w-init headermay help? or other like --bold2t1w-dof or check the distorsion correction step?

@oesteban
Copy link
Member

oesteban commented May 7, 2021

Isn't the mask calculated from the T1w image and projected back to the bold space?

No, that one is calculated on the EPI.

That said, it indeed looks like the first subject has a bad alignment with the T1w.

@alitrelle we've been working on the masking of EPIs - but that work has not yet been released. Can you share these three examples? Please drop me an email with more details about the dataset - maybe we can use Sherlock to share them.

@oesteban
Copy link
Member

oesteban commented May 7, 2021

I'm thinking, one thing you could test (at the expense of undesired behavior) is removing the --dummy-scans flag. That will let fMRIPrep handle which timepoints are to be used in masking and perhaps get a better result.

@effigies
Copy link
Member

effigies commented May 7, 2021

@oesteban We've been in contact with Ali. They're sharing data with us on Sherlock, and @mgxd, @rciric and I have been talking with them.

@oesteban
Copy link
Member

oesteban commented May 7, 2021 via email

@mgxd
Copy link
Collaborator

mgxd commented May 13, 2021

Just to bring some closure to the issue:

The problematic subjects tended to have large negative values - clipping the images to remove these negative values seemed to fix the co-registration and masking errors. This clipping (for both extremely negative/positive values) is something planned for the next upcoming release.

@mgxd mgxd closed this as completed May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants