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

↔️ Fmriprep Ingress #1952

Merged
merged 79 commits into from
Oct 25, 2023
Merged

↔️ Fmriprep Ingress #1952

merged 79 commits into from
Oct 25, 2023

Conversation

e-kenneally
Copy link
Collaborator

@e-kenneally e-kenneally commented Jun 9, 2023

Fixes

Fixes #1902

Description

This new feature offers the ability to ingress fmriprep output data directly into the C-PAC resource pool, so that users can then proceed to perform further processing. Example: pulling in the confounds.tsv and also the BOLD time series that has already been preprocessed and warped to template; then, C-PAC can proceed with denoising and anything else, including calculating connectomes and other derivatives.

Technical details

How to run:

  • Select preconfig fmriprep-ingress or modify pipeline_config_fmriprep-ingress.yml if you want to use more regressors
  • Add output dir to data config under derivatives_dir
  • Data config only needs to contain:
    • Site
    • Subject_id
    • Unique_id
    • Derivatives_dir
  • Run command will need something in the $Data field, but this won’t be touched and can be any path

New preconfig: fmriprep-ingress

  • Outdir_ingress:
    Run: On
    Template: MNI152NLin2009cAsym
  • The 'template' sub-field is only important when the output directory contains outputs in more than one template space
  • Anatomical and functional preprocessing is turned off
  • Default regressors:
    • global_signal
    • white_matter
  • Derivatives:
    • Time Series extraction with atlas list from default config
    • Alff/fAlff - Template space only
    • ReHo - Template space only
    • Network centrality

Major changes:

  • ingress_output_dir function, which is called instead of ingress_raw_anat_data and ingress_raw_func_data. This function pulls in the files from the fmriprep output directory and stores them in the resource pool.
  • New preconfig fmriprep-ingress
  • Regressors ingress: created a new nodeblock ingress_regressors connected to a pipeline switch that pulls in and parses regressors from the provided output directory. This allows the user to select which regressors they would like to apply to the data.
  • Added new function ingress_freesurfer that makes FreeSurfer ingress more modular. FreeSurfer derivatives don't yet run on fMriPrep output directories, but the functionality can be used when ingressing CPAC output directories.

Tests

Correlations for desc-preproc_bold done with pre-configured pipelines:
fmriprep-ingress x fmriprep LTS: 0.65
fmriprep-options x fmriprep LTS: 0.66
fmriprep-ingress x fmriprep-options: 0.41

Correlations for template space desc-bold_mask (called desc-brain_mask in fmriprep):
fmriprep-ingress x fmriprep LTS: 0.978
fmriprep-ingress x fmriprep-options: 0.962

Correlations for derivatives: (ingress derivatives x fmriprep-options derivatives)
- fALFF - 0.92
- ReHo - 0.85
- ALFF - 0.86

Screenshots

Screenshot 2023-06-09 at 10 53 46 AM

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I updated the changelog.
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

e-kenneally and others added 30 commits March 14, 2023 15:24
@e-kenneally e-kenneally marked this pull request as ready for review October 13, 2023 14:36
@e-kenneally e-kenneally temporarily deployed to ACCESS October 13, 2023 14:36 — with GitHub Actions Inactive
@e-kenneally e-kenneally temporarily deployed to ACCESS October 13, 2023 14:36 — with GitHub Actions Inactive
@sgiavasis
Copy link
Collaborator

Great work @e-kenneally !! 🚀

@sgiavasis sgiavasis merged commit 5ae99c4 into develop Oct 25, 2023
37 checks passed
@shnizzedy
Copy link
Member

Just want to clarify a couple things if you're ingressing that I noticed when working on #2011:

  1. You need to specify Regressors in your pipeline config to match what's in your ingress_regressors?
  2. You can only have one named Regressors dict if you're using ingress_regressors?

@e-kenneally e-kenneally deleted the feature/fmriprep_ingress branch April 17, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants