This release is a pre-release and may not be stable for production use.
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:
- Register with freesurfer and download the license file
freesurfer_license.txt) - Install Docker Desktop.
- After having activated your environment, run
pip install fmriprep-docker. - 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.
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
Metadata
Release files for NeuroConn 0.1.0a8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| NeuroConn-0.1.0a8.tar.gz | 7.7 MB | Without provenance | Details for NeuroConn-0.1.0a8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| NeuroConn-0.1.0a8-py3-none-any.whl | Python 3 | none | any | Details for NeuroConn-0.1.0a8-py3-none-any.whl |
Total release size: 15.4 MB
Release files / NeuroConn-0.1.0a8.tar.gz
| Download URL | NeuroConn-0.1.0a8.tar.gz |
|---|---|
| Size | 7.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60781bddbb3367a31682bb544bf7a2d23c270670d961816529a5a1334d7a3219
|
|
BLAKE2b-256 checksum How to use checksums |
98ad935e6b11d95e08358583bfe60faf5af83a9ffea0ab91851b9dc3d2c9cc4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / NeuroConn-0.1.0a8-py3-none-any.whl
| Download URL | NeuroConn-0.1.0a8-py3-none-any.whl |
|---|---|
| Size | 7.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dab244d6ce66f3c082a29ecbb0963c065b06d668709ac9479eda4379586cdb69
|
|
BLAKE2b-256 checksum How to use checksums |
37d9b212234ce54e565489bc2f44ab1a22111a6f674238cd6a82bfe2cd7055d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for NeuroConn 0.1.0a8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.