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

[0I4U] Pipeline reproduction (SPM - raw) #165

Open
9 tasks
cmaumet opened this issue Feb 13, 2024 · 5 comments
Open
9 tasks

[0I4U] Pipeline reproduction (SPM - raw) #165

cmaumet opened this issue Feb 13, 2024 · 5 comments
Assignees
Labels
🧠 hackathon To assess during the hackathon raw SPM 🚀 status: ready for test Ready for running and testing

Comments

@cmaumet
Copy link
Contributor

cmaumet commented Feb 13, 2024

Softwares

"SPM 7487"

Input data

raw data

Additional context

see description below

List of tasks

Please tick the boxes below once the corresponding task is finished. 👍

  • 👌 A maintainer of the project approved the issue, by assigning a 🏁status: ready for dev label to it.
  • 🌳 Create a branch on your fork to start the reproduction.
  • 🌅 Create a file team_{team_id}.py inside the narps_open/pipelines/ directory. You can use a file inside narps_open/pipelines/templates as a template if needed.
  • 📥 Create a pull request as soon as you completed the previous task.
  • 🧠 Write the code for the pipeline, using Nipype and the file architecture described in docs/pipelines.md.
  • 📘 Make sure your code is documented enough.
  • 🐍 Make sure your code is explicit and conforms with PEP8.
  • 🔬 Create tests for your pipeline. You can use files in tests/pipelines/test_team_* as examples.
  • 🔬 Make sure your code passes all the tests you created (see docs/testing.md).

NARPS team description : 0I4U

General

  • teamID : 0I4U
  • NV_collection_link : https://neurovault.org/collections/4938/
  • results_comments : NA
  • preregistered : No
  • link_preregistration_form : NA
  • regions_definition : vmPFC was defined based on the following bilateral region from Harvard Oxford atlas:
    25 Frontal medial cortex
    Amygdala was defined using based on Neuromorphometrics atlas regions:
    31 Right Amygdala
    32 Left Amygdala
    Ventral striatum was defined based on Neuromorphometrics atlas regions:
    23 and 30 - Left and right accumbens
  • softwares : SPM 7487
  • general_comments : NA

Exclusions

  • n_participants : 108
  • exclusions_details : NA

Preprocessing

  • used_fmriprep_data : No
  • preprocessing_order : All Pre-processing steps were performed using SPM12
    1. Realign (to first) and unwarp using provided fieldmap (vdm5 computed)
    2. Co-registration to structural scan
    3. Segmentation and spatial normalization of structural data to MNI space using Segment function
    4. Application of the normalization parameters (iy) from step 3 to the co-registered functional data
    5. Masking of non-grey matter voxels in normalized functional data using binary downsampled wc1 images (>0.2 threshold)
    6. Smoothing with Gaussian kernel of 5 mm FWHM
  • brain_extraction : NA
  • segmentation : Segmentation function in SPM12
  • slice_time_correction : Not performed
  • motion_correction : Default realign and unwarp in SPM12 including fieldmap based distortion correction:
    • Rigid body
    • Register to first
    • 4th Degree B-Spline
  • motion :
  • gradient_distortion_correction : s.above
  • intra_subject_coreg : NA
  • distortion_correction : Distortion correction as integrated in realign- and unwarp in SPM12 using default parameters including a precomputed phase map
  • inter_subject_reg : SPM12:
    • volume based registration to MNI space using normalization parameters (iy) derived from T1 scan using Segment function (default paramters) in SPM12 (comprises distortion correction)
    • final resolution is 1.5 mm isotropic
  • intensity_correction : Bias correction for T1 as default in the SPM12 segment utility
  • intensity_normalization : Default scaling in SPM ("session specific grand mean scaling")
  • noise_removal : 6 motion parameters were included into the first level analyses
  • volume_censoring : No censoring applied
  • spatial_smoothing : Smoothing using a Gaussian kernel of 5 mm FWHM (Smooth function in SPM)
  • preprocessing_comments : NA

Analysis

  • data_submitted_to_model : No subjects or time poins excluded (all 4 sessions each 453 frames for all 108 subjects used)
  • spatial_region_modeled : Analyses were restricted to a grey matter mask extracted from another dataset to exclude white matter regions from analyses
  • independent_vars_first_level : All in SPM12:
    • Event-related design, 4 within subject sessions
    • 1 Condition: Stimulus presentation, onsets based on tsv file, duration 4 seconds
    • 2 Parametric modulators: Gain and loss modelled with 1st order polynomial expansion
    • 1 Condition: button press, onsets based on tsv file, duration 0 seconds
    • Standard 6 motion parameters included as regressors per session
    • HRF: Canonical plus temporal derivative
    • Explicit grey matter mask applied, No other masking thresholds
    • Serial correlation: AR(1)
    • All other parameters as default
    • 2 T-contrasts generated modelling positive effect of gain and loss per subject across all sessions
  • RT_modeling : onset
  • movement_modeling : 1
  • independent_vars_higher_level :
    • Separate one sample t-tests for gain, loss for each group (equal Ind, equal Range) including age and sex as covariates to test for parametric effects of gain and loss in each group (Hypotheses 1-8)
    • Two-sample t-tests (with age and sex as covariates) to compare equal Range vs equal Indifference (Hypothesis 9)
  • model_type : Mass Univariate
  • model_settings : For 1st level s. above.
    For 2nd level:
    • Random effect SPM default second level (one-sample t-tests for hypotheses 1-8 and two-sample t-test for hypothesis 9), age and sex included as covariates
    • Unequal variance between groups assumed
  • inference_contrast_effect :
    • 1st level: two t-contrast contrasts generated: positive effect of gain and positive effect of loss per subject across all sessions)
    • 2nd level: first level con maps entered into 2nd level. According to the respective hypothesis t-contrast for positive or negative effect of gain loss (hypotheses 1-8) or t-contrast for group comparison (hypothesis 9)
    • Whole brain FWE correction performed on voxel-level for all 2nd level analyses. Masks described above were applied to test for whole-brain significant effects in specified regions as based on the hypotheses
  • search_region : Whole-brain corrected p-value threshold applied testing for significant effects within the specified regional masks
  • statistic_type : Voxel-wise whole-brain FWE corrected as in SPM
  • pval_computation : NA
  • multiple_testing_correction : FWE (Random field Theory)
  • comments_analysis : NA

Categorized for analysis

  • region_definition_vmpfc : atlas HOA
  • region_definition_striatum : atlas Neuromorphometrics
  • region_definition_amygdala : atlas Neuromorphometrics
  • analysis_SW : SPM
  • analysis_SW_with_version : SPM12
  • smoothing_coef : 5
  • testing : parametric
  • testing_thresh :
  • correction_method : GRTFWE voxelwise
  • correction_thresh_ :

Derived

  • n_participants : 108
  • excluded_participants : n/a
  • func_fwhm : 5
  • con_fwhm :

Comments

  • excluded_from_narps_analysis : No
  • exclusion_comment : N/A
  • reproducibility : 2
  • reproducibility_comment :
@cmaumet cmaumet added the 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work label Feb 13, 2024
@cmaumet
Copy link
Contributor Author

cmaumet commented Feb 13, 2024

This team has a corresponding file marked as "wip" and initially started by @elodiegermani (see #3).

To be done: Verification of the adequation between textual description and code, correction of mistakes (if necessary)

@bclenet bclenet added 🏁 status: ready for dev Ready for work and removed 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Feb 14, 2024
@bclenet bclenet added the 🧠 hackathon To assess during the hackathon label Dec 11, 2024
@bclenet bclenet moved this from Backlog to Not started in NARPS Open Pipelines | Reproductions Dec 17, 2024
@bclenet
Copy link
Collaborator

bclenet commented Dec 18, 2024

Hi @cmaumet ,

The description mentions :

independent_vars_higher_level :
[...]
Two-sample t-tests (with age and sex as covariates) to compare equal Range vs equal Indifference (Hypothesis 9)

Do we have to include two age covariates columns, as well as two gender covariates columns ? Which means one for each group, as in the following "pseudo design matrix" (with values to be defined for M and F).

subject id equalRange equalIndif age (equalRange) gender (equalRange) age (equalIndif) gender (equalIndif)
001 1.0 0.0 24.0 M 0.0 0.0
002 0.0 1.0 0.0 0.0 27.0 M
003 1.0 0.0 25.0 F 0.0 0.0
004 0.0 1.0 0.0 0.0 30.0 M

Or do we want the following pseudo design matrix (with values to be defined for M and F) ?

subject id equalRange equalIndif age gender
001 1.0 0.0 24.0 M
002 0.0 1.0 27.0 M
003 1.0 0.0 25.0 F
004 0.0 1.0 30.0 M

@bclenet bclenet self-assigned this Dec 18, 2024
@bclenet
Copy link
Collaborator

bclenet commented Dec 18, 2024

@cmaumet ,

Here is another quick question. The team mentions:

preprocessing_order : All Pre-processing steps were performed using SPM12
[...]
i. Realign (to first) and unwarp using provided fieldmap (vdm5 computed)
ii. Co-registration to structural scan
iii. Segmentation and spatial normalization of structural data to MNI space using Segment function
iv. Application of the normalization parameters (iy) from step 3 to the co-registered functional data
v. Masking of non-grey matter voxels in normalized functional data using binary downsampled wc1 images (>0.2 threshold)
vi. Smoothing with Gaussian kernel of 5 mm FWHM

Do you know which SPM12 function allows to perform the masking ? Is it part of another mentioned function ?

Thanks !

@bclenet bclenet mentioned this issue Dec 18, 2024
8 tasks
@cmaumet
Copy link
Contributor Author

cmaumet commented Dec 18, 2024

Hi @bclenet

The description mentions :

independent_vars_higher_level :
[...]
Two-sample t-tests (with age and sex as covariates) to compare equal Range vs equal Indifference (Hypothesis 9)

Do we have to include two age covariates columns, as well as two gender covariates columns ? Which means one for each group, as in the following "pseudo design matrix" (with values to be defined for M and F).
subject id equalRange equalIndif age (equalRange) gender (equalRange) age (equalIndif) gender (equalIndif)
001 1.0 0.0 24.0 M 0.0 0.0
002 0.0 1.0 0.0 0.0 27.0 M
003 1.0 0.0 25.0 F 0.0 0.0
004 0.0 1.0 0.0 0.0 30.0 M

Or do we want the following pseudo design matrix (with values to be defined for M and F) ?
subject id equalRange equalIndif age gender
001 1.0 0.0 24.0 M
002 0.0 1.0 27.0 M
003 1.0 0.0 25.0 F
004 0.0 1.0 30.0 M

The second option you provided ("pseudo design matrix") is enough in this case as we want to model the effect of age/gender (but are not interested by the effect of age/gender in each group).

@cmaumet
Copy link
Contributor Author

cmaumet commented Dec 18, 2024

@cmaumet ,

Here is another quick question. The team mentions:

preprocessing_order : All Pre-processing steps were performed using SPM12
[...]
i. Realign (to first) and unwarp using provided fieldmap (vdm5 computed)
ii. Co-registration to structural scan
iii. Segmentation and spatial normalization of structural data to MNI space using Segment function
iv. Application of the normalization parameters (iy) from step 3 to the co-registered functional data
v. Masking of non-grey matter voxels in normalized functional data using binary downsampled wc1 images (>0.2 threshold)
vi. Smoothing with Gaussian kernel of 5 mm FWHM

Do you know which SPM12 function allows to perform the masking ? Is it part of another mentioned function ?

This can be done using the imcalc function that allows to apply mathematical formulas on images. Here something like "c1>0.2"

Thanks !

Thank you!

@bclenet bclenet moved this from Not started to In progress in NARPS Open Pipelines | Reproductions Dec 19, 2024
@bclenet bclenet added 🚀 status: ready for test Ready for running and testing and removed 🏁 status: ready for dev Ready for work labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧠 hackathon To assess during the hackathon raw SPM 🚀 status: ready for test Ready for running and testing
Projects
Status: In progress
Development

No branches or pull requests

2 participants