Published September 12, 2025 | Version v4
Software Open

Fetal fMRI prep and longitudinal modelling code

  • 1. NYU Langone Health

Contributors

Description

The scripts are primarily written in Python and R and comprise four main packages: (1) a Python package for multi-echo fetal brain fMRI preprocessing, supplementing Ji (2024, PLOS Biology); (2) a Python package for T2*/R2* mapping from multi-echo fetal MRI data, supplementing Ji (2025, Human Brain Mapping) and Ji (2025, Communications Biology); (3) an R package for longitudinal modeling of brain network functional connectivity changes from the fetal to neonatal period, supplementing Ji (2024, PLOS Biology); and (4) an R package for statistical analysis and plot generation for Ji (2025, Communications Biology).

Acknowledgments

Codes for ICA denoising is developed based on AROMA source code downloaded from: https://github.com/maartenmennes/ICA-AROMA/tree/master. References: Pruim RHR, Mennes M, van Rooij D, Llera A, Buitelaar JK, Beckmann CF. ICA-AROMA: A robust ICA-based strategy for removing motion artifacts from fMRI data. Neuroimage. 2015 May 15;112:267-277. doi: 10.1016/j.neuroimage.2015.02.064. Epub 2015 Mar 11. PMID: 25770991.

Code for CNN-based brain extraction is from Dr. Saige Rutherford's github, downloaded from: https://github.com/saigerutherford/fetal-code. Reference: Rutherford S, Sturmfels P, Angstadt M, Hect J, Wiens J, van den Heuvel MI, Scheinost D, Sripada C, Thomason M. Automated Brain Masking of Fetal Functional MRI with Open Data. Neuroinformatics. 2022 Jan;20(1):173-185. doi: 10.1007/s12021-021-09528-5. Epub 2021 Jun 15. PMID: 34129169; PMCID: PMC9437772.

Primary contributors: Amyn Majbri, Lanxin Ji, Mark Duffy.
PI: Moriah Thomason
Funding: This work is supported by NIH grants ES032294, MH122447, MH110793, ES026022 to Moriah Thomason.

 
### Dependencies for R2* estimation
Python Version 3.10.8
PyCharm Community Edition 2022.3.3 - Build #PC-223.8836.34
Packages
numpy 1.24.2
nibabel 5.0.1
matplotlib 3.7.1
scipy 1.10.1
pandas 1.5.3
 
ANTS Version 2.5.3.post16-g1892fef
FSL Version 6.0.6.1
FSLeyes Version 1.10.3
MATLAB Version R2022b
SPM Version SPM12
 

Files

v4.zip

Files (429.0 MB)

Name Size Download all
md5:a94e6ed52b3ccb3ba06ff489a101e621
429.0 MB Preview Download

Additional details

Related works

Is supplement to
Journal article: 10.1371/journal.pbio.3002909 (DOI)
Journal article: 10.1002/hbm.70073 (DOI)

Funding

National Institutes of Health
From the womb to the classroom: Linking perinatal micronutrients and toxicants to neural and behavioral development in utero and in childhood ES032294
National Institutes of Health
Examining Prenatal Inflammation and Neurodevelopment in a Longitudinal Fetal-to-Age 9 Imaging Study MH122447
National Institutes of Health
In utero Assessment of the Human Neural Connectome and Later Child Behavior MH110793
National Institutes of Health
Consequences of prenatal toxicant exposure on fetal brain function ES026022