NeuroConn


NameNeuroConn JSON
Version 0.1.0a8 PyPI version JSON
download
home_pagehttps://github.com/victoris93/NeuroConn
SummaryA BIDS toolbox for connectivity & gradient analyses.
upload_time2024-06-16 16:44:28
maintainerNone
docs_urlNone
authorVictoria Shevchenko
requires_python>=3.6
licenseNone
keywords fmriprep bids connectivity gradients dispersion
VCS
bugtrack_url
requirements pytest nilearn numpy pandas nibabel scikit-learn brainspace gdown hcp-utils
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

<font color="red">**NB! If you wish to run `fmriprep` within this package, install Docker Desktop first. Keep it running when you start** `RawDataset.docker_fmriprep()`</font>
- 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() # from https://openneuro.org/datasets/ds002748
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

# Download the dataset preprocessed with fMRIPrep
example_data = fetch_example_data('https://drive.google.com/file/d/1XjF5wDJXHzMyfoAjQE6NW2xcj9PulZzH/view?usp=share_link') 
# Initialize the dataset object 
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](https://github.com/victoris93/PyConn/blob/master/NeuroConn.ipynb).

## 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





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/victoris93/NeuroConn",
    "name": "NeuroConn",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "fmriprep, BIDS, connectivity, gradients, dispersion",
    "author": "Victoria Shevchenko",
    "author_email": "shevchenko682@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/98/ad/935e6b11d95e08358583bfe60faf5af83a9ffea0ab91851b9dc3d2c9cc4a/NeuroConn-0.1.0a8.tar.gz",
    "platform": null,
    "description": "# NeuroConn\n\nNeuroConn 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.\nDocumentation: https://victoris93.github.io/NeuroConn/\n\n## Features\n\n<font color=\"red\">**NB! If you wish to run `fmriprep` within this package, install Docker Desktop first. Keep it running when you start** `RawDataset.docker_fmriprep()`</font>\n- Preprocessing of fMRI data using the fmriprep pipeline\n- Computation of connectivity matrices and gradients\n- Direct output of gradients or connectivity matrices for any subject without specifying preprocessing parameters\n- Handling of BIDS-formatted datasets\n\n## Installation\n\nYou can install NeuroConn using pip: `pip install NeuroConn`\n\n## Usage\n**1. fMRIPrep**. The class `RawDataset` features a method to run fmriprep within within your Python environment. Before running it:\n1. Register with freesurfer and download the license file `freesurfer_license.txt`)\n2. Install Docker Desktop.\n3. After having activated your environment, run `pip install fmriprep-docker`.\n4. Start Docker Desktop.\nThen, give this a try:\n\n```\nfrom NeuroConn.preprocessing.preprocessing import RawDataset, FmriPreppedDataSet\nfrom NeuroConn.data.example_datasets import fetch_example_data\nex_data = fetch_example_data() # from https://openneuro.org/datasets/ds002748\ndata = RawDataset(ex_data)\nsubject = '52'\ndata.docker_fmriprep(subject, fs_reconall = False, fs_license = <path_to_freesurfer_license.txt>)\n```\n\n**2. Post-fMRIPrep** Here's an example of how to use the `FmriPreppedDataSet` class provided by NeuroConn:\n\n```\nfrom NeuroConn.preprocessing.preprocessing import RawDataset, FmriPreppedDataSet\nfrom NeuroConn.data.example_datasets import fetch_example_data\n\n# Download the dataset preprocessed with fMRIPrep\nexample_data = fetch_example_data('https://drive.google.com/file/d/1XjF5wDJXHzMyfoAjQE6NW2xcj9PulZzH/view?usp=share_link') \n# Initialize the dataset object \ndataset = FmriPreppedDataSet(example_data)\n\n# Compute connectivity matrix\nconn_matrix = data_prepped.get_conn_matrix(subject, parcellation='schaefer', task='rest', n_parcels=1000, save = True)\n\n# Compute 10 gradients (Margulies et al., 2016)\ngradients = get_gradients(data_prepped,subject, task='rest', n_components = 10, approach = \"pca\")\n```\n\nFor more detailed information and examples, please refer to the [notebook](https://github.com/victoris93/PyConn/blob/master/NeuroConn.ipynb).\n\n## Contributing\n\nContributions 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.\n\n## License\n\nNeuroConn is released under the MIT License. See the LICENSE file for more details.\n\n## Example Data\n\nBezmaternykh 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. \u2116 8846097. PP. 1-15. DOI: 10.1155/2021/8846097\n\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A BIDS toolbox for connectivity & gradient analyses.",
    "version": "0.1.0a8",
    "project_urls": {
        "Homepage": "https://github.com/victoris93/NeuroConn"
    },
    "split_keywords": [
        "fmriprep",
        " bids",
        " connectivity",
        " gradients",
        " dispersion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "37d9b212234ce54e565489bc2f44ab1a22111a6f674238cd6a82bfe2cd7055d7",
                "md5": "c9a90e0fb4d0fb4ae95616721c60e26c",
                "sha256": "dab244d6ce66f3c082a29ecbb0963c065b06d668709ac9479eda4379586cdb69"
            },
            "downloads": -1,
            "filename": "NeuroConn-0.1.0a8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c9a90e0fb4d0fb4ae95616721c60e26c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7713258,
            "upload_time": "2024-06-16T16:44:23",
            "upload_time_iso_8601": "2024-06-16T16:44:23.028736Z",
            "url": "https://files.pythonhosted.org/packages/37/d9/b212234ce54e565489bc2f44ab1a22111a6f674238cd6a82bfe2cd7055d7/NeuroConn-0.1.0a8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "98ad935e6b11d95e08358583bfe60faf5af83a9ffea0ab91851b9dc3d2c9cc4a",
                "md5": "10fdf73f660b579f8e17ef2aa731112a",
                "sha256": "60781bddbb3367a31682bb544bf7a2d23c270670d961816529a5a1334d7a3219"
            },
            "downloads": -1,
            "filename": "NeuroConn-0.1.0a8.tar.gz",
            "has_sig": false,
            "md5_digest": "10fdf73f660b579f8e17ef2aa731112a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7712562,
            "upload_time": "2024-06-16T16:44:28",
            "upload_time_iso_8601": "2024-06-16T16:44:28.326089Z",
            "url": "https://files.pythonhosted.org/packages/98/ad/935e6b11d95e08358583bfe60faf5af83a9ffea0ab91851b9dc3d2c9cc4a/NeuroConn-0.1.0a8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-16 16:44:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "victoris93",
    "github_project": "NeuroConn",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "nilearn",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "nibabel",
            "specs": []
        },
        {
            "name": "scikit-learn",
            "specs": []
        },
        {
            "name": "brainspace",
            "specs": []
        },
        {
            "name": "gdown",
            "specs": []
        },
        {
            "name": "hcp-utils",
            "specs": []
        }
    ],
    "lcname": "neuroconn"
}
        
Elapsed time: 2.93111s