Skip to main content

A BIDS toolbox for connectivity & gradient analyses.

Project description

NeuroConn

NeuroConn is a Python package that provides a user-friendly interface for fMRI preprocessing and computing connectivity matrices and gradients. It is designed as a BIDS application, allowing easy integration with BIDS-formatted datasets. Documentation: https://victoris93.github.io/NeuroConn/

Features

NB! If you wish to run fmriprep within this package, install Docker Desktop first. Keep it running when you start RawDataset.docker_fmriprep()

  • Preprocessing of fMRI data using the fmriprep pipeline
  • Computation of connectivity matrices and gradients
  • Direct output of gradients or connectivity matrices for any subject without specifying preprocessing parameters
  • Handling of BIDS-formatted datasets

Installation

You can install NeuroConn using pip: pip install NeuroConn

Usage

1. fMRIPrep. The class RawDataset features a method to run fmriprep within within your Python environment. Before running it:

  1. Register with freesurfer and download the license file freesurfer_license.txt)
  2. Install Docker Desktop.
  3. After having activated your environment, run pip install fmriprep-docker.
  4. Start Docker Desktop. Then, give this a try:
from NeuroConn.preprocessing.preprocessing import RawDataset, FmriPreppedDataSet
from NeuroConn.data.example_datasets import fetch_example_data
ex_data = fetch_example_data()
data = RawDataset(ex_data)
subject = '52'
data.docker_fmriprep(subject, fs_reconall = False, fs_license = <path_to_freesurfer_license.txt>)

2. Post-fMRIPrep Here's an example of how to use the FmriPreppedDataSet class provided by NeuroConn:

from NeuroConn.preprocessing.preprocessing import RawDataset, FmriPreppedDataSet
from NeuroConn.data.example_datasets import fetch_example_data

# Initialize the dataset object
ex_data = fetch_example_data() # from https://openneuro.org/datasets/ds002748
dataset = FmriPreppedDataSet(example_data)

# Compute connectivity matrix
conn_matrix = data_prepped.get_conn_matrix(subject, parcellation='schaefer', task='rest', n_parcels=1000, save = True)

# Compute 10 gradients (Margulies et al., 2016)
gradients = get_gradients(data_prepped,subject, task='rest', n_components = 10, approach = "pca")

For more detailed information and examples, please refer to the notebook.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on this GitHub repository.

License

NeuroConn is released under the MIT License. See the LICENSE file for more details.

Example Data

Bezmaternykh D.D., Melnikov M.Y., Savelov A.A. et al. Brain Networks Connectivity in Mild to Moderate Depression: Resting State fMRI Study with Implications to Nonpharmacological Treatment. Neural Plasticity, 2021. V. 2021. № 8846097. PP. 1-15. DOI: 10.1155/2021/8846097

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NeuroConn-0.1.0a5.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

NeuroConn-0.1.0a5-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file NeuroConn-0.1.0a5.tar.gz.

File metadata

  • Download URL: NeuroConn-0.1.0a5.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for NeuroConn-0.1.0a5.tar.gz
Algorithm Hash digest
SHA256 f7a3946901be0a2f9f48c834c4400f996a227e48f0d2f4dc8de3b56ef80c694e
MD5 2b4fc694567f1c3ea6ff891e6784070d
BLAKE2b-256 9aec960187582f9aa7ae21eaf286c1ba601a69a5e7627ccc14905b09a98e6c1c

See more details on using hashes here.

File details

Details for the file NeuroConn-0.1.0a5-py3-none-any.whl.

File metadata

  • Download URL: NeuroConn-0.1.0a5-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for NeuroConn-0.1.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 a006958b81e4b0d1454bf0101d271d6a69357e95c2a08fb03db68f025e4afe7e
MD5 1ef017eb3a36c406559582b10f2db905
BLAKE2b-256 7b2a6b56b1528712d6a21553f61d7049ce759786e2a164ec3f9ac6fa42730031

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page