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

default output grid: BOLD or template grid? #2060

Closed
snastase opened this issue Apr 2, 2020 · 5 comments
Closed

default output grid: BOLD or template grid? #2060

snastase opened this issue Apr 2, 2020 · 5 comments
Assignees
Labels
Milestone

Comments

@snastase
Copy link

snastase commented Apr 2, 2020

My understanding according to the documentation is that specifying, e.g., --output-spaces MNI152NLin2009cAsym without a :res will by default output the BOLD data in the native BOLD grid (synonymous to :res-native; this is what I want). However, running version 20.0.2 seems to yield preprocessed outputs in the 2 x 2 x 2 mm template grid rather than the original 3 x 3 x 4 BOLD grid. My fMRIPrep invocation is:

singularity run --cleanenv \                                                       
    --bind $bids_dir:/data \                                                       
    --bind /scratch/snastase/narratives/work \                                     
    --bind /jukebox/hasson/templateflow:/home/fmriprep/.cache/templateflow \       
    /jukebox/hasson/singularity/fmriprep/fmriprep-v20.0.2.simg \                   
    --skip_bids_validation \                                                       
    --participant-label sub-$1 \                                                   
    --nthreads 4 --omp-nthreads 4 \                                                
    --longitudinal --bold2t1w-dof 6 \                                              
    --medial-surface-nan \                                                         
    --output-spaces anat func fsaverage fsaverage6 fsaverage5 \                    
                    MNI152NLin2009cAsym MNI152NLin6Asym \                          
    --fs-license-file /data/code/fs-license.txt --notrack \                        
    --use-syn-sdc --write-graph --work-dir /scratch/snastase/narratives/work \   
    /data /data/derivatives participant

Here's a screencap of nib-ls output where you can see that the preprocessed BOLD outputs in BOLD and T1w spaces (--output-spaces anat func) are in the original 3 x 3 x 4 BOLD resolution, where as the outputs in MNI space (--output-spaces MNI152NLin2009cAsym MNI152NLin6Asym) have inherited the 2 x 2 x 2 template grid (despite me not specifying :res-2).
image

Maybe this is the correct behavior and I'm just confused about the documentation...? I can try re-running with explicitly specifying :res-native and see if that displays the correct behavior.

@snastase snastase added the bug label Apr 2, 2020
@oesteban oesteban added this to the 20.1.0 LTS milestone Apr 2, 2020
@oesteban
Copy link
Member

oesteban commented Apr 2, 2020

Yes, your interpretation is correct. We'll look into this and come back to you ASAP.

@oesteban
Copy link
Member

oesteban commented Apr 3, 2020

I'm not seeing that exact behavior, although I'm using the cutting edge development version:

$ fmriprep /oak/stanford/groups/russpold/data/openfmri/ds000005 derivatives/ participant --participant-label 01 -vv --nthreads 8 --omp-nthreads 8 -w work --skip-bids-validation --cifti-output --mem 32G --fs-subjects-dir /oak/stanford/groups/russpold/data/openfmri/derivatives/ds000005/freesurfer-6.0.1/ &> fmriprep2.log

$ nib-ls derivatives/fmriprep/sub-01/func/*.nii.gz
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_res-native_boldref.nii.gz             float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_res-native_desc-aparcaseg_dseg.nii.gz float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_res-native_desc-aseg_dseg.nii.gz      float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_res-native_desc-brain_mask.nii.gz     float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_res-native_desc-preproc_bold.nii.gz    int16  [ 63,  74,  49, 240] 3.12x3.12x4.00x2.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_res-native_boldref.nii.gz             float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_res-native_desc-aparcaseg_dseg.nii.gz float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_res-native_desc-aseg_dseg.nii.gz      float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_res-native_desc-brain_mask.nii.gz     float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_res-native_desc-preproc_bold.nii.gz    int16  [ 63,  74,  49, 240] 3.12x3.12x4.00x2.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_res-native_boldref.nii.gz             float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_res-native_desc-aparcaseg_dseg.nii.gz float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_res-native_desc-aseg_dseg.nii.gz      float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_res-native_desc-brain_mask.nii.gz     float32 [ 63,  74,  49]      3.12x3.12x4.00
derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_res-native_desc-preproc_bold.nii.gz    int16  [ 63,  74,  49, 240] 3.12x3.12x4.00x2.00

@mgxd, do you have any ideas of when we might have addressed this issue?

@mgxd
Copy link
Collaborator

mgxd commented Apr 3, 2020

interesting - i'm also running the cutting edge version (with nipreps/niworkflows#492 applied) and I see the same problem as @snastase

~/code/fmriprep-testing$ nib-ls ds005/derivatives/fmriprep/sub-01/func/*.nii.gz
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_boldref.nii.gz                                   float32 [ 50,  50,  34]      4.00x4.00x4.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_desc-brain_mask.nii.gz                            uint8  [ 50,  50,  34]      4.00x4.00x4.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_desc-preproc_bold.nii.gz                         float32 [ 50,  50,  34,  16] 4.00x4.00x4.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin6Asym_boldref.nii.gz             float32 [ 91, 109,  91]      2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin6Asym_desc-aparcaseg_dseg.nii.gz  int16  [ 91, 109,  91]      2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin6Asym_desc-aseg_dseg.nii.gz       int16  [ 91, 109,  91]      2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin6Asym_desc-brain_mask.nii.gz      uint8  [ 91, 109,  91]      2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-01_space-MNI152NLin6Asym_desc-preproc_bold.nii.gz   float32 [ 91, 109,  91,  16] 2.00x2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_boldref.nii.gz                                   float32 [ 50,  50,  34]      4.00x4.00x4.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_desc-brain_mask.nii.gz                            uint8  [ 50,  50,  34]      4.00x4.00x4.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_desc-preproc_bold.nii.gz                         float32 [ 50,  50,  34,  16] 4.00x4.00x4.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin6Asym_boldref.nii.gz             float32 [ 91, 109,  91]      2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin6Asym_desc-aparcaseg_dseg.nii.gz  int16  [ 91, 109,  91]      2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin6Asym_desc-aseg_dseg.nii.gz       int16  [ 91, 109,  91]      2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin6Asym_desc-brain_mask.nii.gz      uint8  [ 91, 109,  91]      2.00x2.00x2.00
ds005/derivatives/fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-02_space-MNI152NLin6Asym_desc-preproc_bold.nii.gz   float32 [ 91, 109,  91,  16] 2.00x2.00x2.00x2.00

input BOLD files:

~/code/fmriprep-testing$ nib-ls ds005/sub-01/func/*.nii.gz
ds005/sub-01/func/sub-01_task-mixedgamblestask_run-01_bold.nii.gz float32 [ 50,  50,  34,  16] 4.00x4.00x4.00x2.00
ds005/sub-01/func/sub-01_task-mixedgamblestask_run-02_bold.nii.gz float32 [ 50,  50,  34,  16] 4.00x4.00x4.00x2.00

@mgxd
Copy link
Collaborator

mgxd commented Apr 9, 2020

@snastase - specifying your outputs explicitly with :res-native should do the trick in previous versions, but this has been patched in the latest pre-release (20.1.0rc2).

@mgxd mgxd closed this as completed Apr 9, 2020
@snastase
Copy link
Author

Excellent—thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants