Skip to main content

A software package for group-level rs-fMRI analysis.

Project description

multiseed

multiseed runs unsupervised group-level resting-state fMRI network extraction using a many-seed-based approach combined with dimensionality reduction. It's available on PyPI.

In practice, it:

  1. loads multiple rs-fMRI datasets grouped into cohorts,
  2. builds one combined brain mask from all non-zero voxels,
  3. samples random seed locations inside that mask,
  4. turns each voxel into a vector of seed-correlation values,
  5. reduces those vectors with factor analysis, absolute-value-based non-negative matrix factorization, principal component analysis or independent component analysis, and
  6. writes one 3D map per extracted network/component for every dataset.

Because the mask, seed set, and reduction model are built jointly across all cohorts, the resulting feature maps are directly comparable across subjects/datasets.

Quick start

Install using pip:

pip install multiseed

Generate a template config (which contains several explanatory comments):

python -m multiseed --write-default-config analysis.cfg

Edit analysis.cfg, then run the analysis:

python -m multiseed analysis.cfg

If you installed a console entry point (default on most systems), the same command is:

multiseed analysis.cfg

The CLI uses a fixed random seed, so repeated runs with the same inputs/config are reproducible.

Programmatic use

The multiseed library exposes an extensive API encompassing almost all parts of its algorithm. See the documentation for more details.

Simple config example

N_SEEDS = 1000
SEED_RADIUS = 10
REDUCTION_ALGORITHM = FactorAnalysis
RESULTS_FOLDER = results

[Controls]
/data/controls/sub01
/data/controls/sub02

[Patients]
/data/patients/*

Available models are FactorAnalysis, AbsNMF, PCA, ICA

Each dataset is one folder containing the 3D volumes from a single scan. Supported image formats are:

  • .img, .img.gz, .img.z
  • .nii, .nii.gz

A cohort (e.g. Controls or Patients in this example) is a named list of dataset folders.

See the template config for more parameters and information.

What gets written

Resulting networks are written to the RESULTS_FOLDER, organized by cohort and dataset. The exact structure is:

results/
  mask.hdr.gz
  mask.img.gz
  seed_visualization.hdr.gz
  seed_visualization.img.gz
  network_001/
    average_visualization.hdr.gz
    average_visualization.img.gz
    <Cohort Name>/
      result_for_dataset_000001.hdr.gz
      result_for_dataset_000001.img.gz

Notes

  • All datasets are assumed to have matching spatial dimensions.
  • The combined mask is built from voxels that are nonzero in at least one dataset.
  • The exported average visualizations are display-oriented summaries; for downstream numeric work, use the saved float results.

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

multiseed-1.1.0.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multiseed-1.1.0-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file multiseed-1.1.0.tar.gz.

File metadata

  • Download URL: multiseed-1.1.0.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for multiseed-1.1.0.tar.gz
Algorithm Hash digest
SHA256 39dd0520d321ed288e205c600975bfb56c9fd15b1aaa238a4c253b969a5793d0
MD5 da5b2e662ba82374d326d59063f045cc
BLAKE2b-256 15d9877969cf67cdd6b15adcf916e857fc49b9fefbf4eaf11c0e2e6d2f851cfb

See more details on using hashes here.

File details

Details for the file multiseed-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: multiseed-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for multiseed-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a22c6e37254f47711dd2dda5fbaebf5a16ff5279c6f85010a566c99652d6788
MD5 c5faf2baa6be2024cd64a272f936a479
BLAKE2b-256 efa40d9b4cc8a8cf06cd7cbcc25ac58c7c2414681f4f162f18b7319e52b9a355

See more details on using hashes here.

Supported by

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