Skip to main content

Automated EEG to BIDS conversion (experimental MEG support)

Project description

codecov Python tests Documentation Status https://img.shields.io/badge/Preprint-Zenodo-orange

sovabids

Visit the documentation

Supported Formats

sovabids reads EEG files via MNE-Python’s read_raw, which supports a wide range of formats including BrainVision, EDF/BDF, EEGLAB, FIF, CNT, KIT/SQD, CTF, and more. See the full list in the MNE documentation.

Output is always written as a valid BIDS dataset. The table below lists formats that can also be exported natively (i.e., the BIDS data files stay in that format rather than being converted to BrainVision):

Format

Extension

Extra needed

Notes

BrainVision

.vhdr

(core)

Default output format; pybv included in base install

EDF

.edf

sovabids[formats]

Requires edfio; date must be in 1985–2084

EEGLAB

.set

sovabids[formats]

Requires eeglabio; montage with fiducials needed

FIF

.fif

(core)

MNE native format; use for MEG data (experimental — see warning above)

Install export support for EDF and EEGLAB:

pip install "sovabids[formats]"

For all other readable formats, sovabids converts the data to BrainVision on output (the default mne-bids behaviour).

Architecture

The main elements of sovabids are:
  • A source path with the original dataset.

  • A bids path that will be the output path of the conversion.

  • A rules file that configures how the conversion is done from the general perspective.

  • A mapping file that encodes how the conversion is performed to each individual file of the dataset.

https://mermaid.ink/svg/eyJjb2RlIjoiZ3JhcGggTFJcbiAgICBTPlwiU291cmNlIHBhdGhcIl1cbiAgICBCPlwiQmlkcyBwYXRoXCJdXG4gICAgUj5cIlJ1bGVzIGZpbGVcIl1cbiAgICBBUigoXCJBcHBseSBSdWxlc1wiKSlcbiAgICBNPlwiTWFwcGluZ3MgZmlsZVwiXVxuICAgIENUKChcIkNvbnZlcnQgVGhlbVwiKSlcbiAgICBPWyhcIkNvbnZlcnRlZCBkYXRhc2V0XCIpXVxuICAgIFMgLS0-IEFSXG4gICAgQiAtLT4gQVJcbiAgICBSIC0tPiBBUlxuICAgIEFSIC0tPiBNXG4gICAgTSAtLT4gQ1RcbiAgICBDVCAtLT4gT1xuICAiLCJtZXJtYWlkIjp7InRoZW1lIjoiZm9yZXN0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0

Internally sovabids uses MNE-Python and MNE-BIDS to perform the conversion. In a sense is a wrapper that allows to do conversions from the command line.

Basic Usage

Terminal User Interface (sovatui)

The easiest way to use sovabids is through its terminal user interface (TUI) called sovatui. This will allow you to do the conversion without having to write any command line code, and also to have a more visual experience of the conversion process. The TUI guides you through the full conversion workflow in four tabs: Setup, Rules, Mappings, and Convert.

Installation for TUI usage

This will install sovabids with the terminal user interface dependencies.

pip install "sovabids[tui]"

Running the TUI

sovatui

See the TUI tutorial video for a walkthrough and its example.

Command Line Interface (CLI) entry-points

Use sovabids through its CLI entry-points as follows:

Installation
pip install sovabids
sovapply

Use the sovapply entry-point to produce a mapping file from a source path, an output bids root path and a rules filepath.

sovapply source_path bids_path rules_path

By default the mapping file made will have the following filepath:

bids_path/code/sovabids/mappings.yml
sovaconvert

Use the sovaconvert entry-point to convert the dataset given its mapping file.

sovaconvert mapping_file

Using the experimental web GUI

Installation for WEB GUI usage

This will install sovabids for usage with an experimental web gui.

pip install "sovabids[gui]"

See the WEB GUI tutorial video for a walkthrough and its example.

Using the experimental bidscoin plugin

For the experimental bidscoin plugin, install the sovabids fork of bidscoin manually:

pip install "git+https://github.com/yjmantilla/bidscoin.git@sovabids"

Follow the example at https://sovabids.readthedocs.io/en/latest/auto_examples/bidscoin_example.html to see how to use the plugin.

Installation for developers

Fork this repo and run:

git clone https://github.com/<gh-username>/sovabids.git
cd sovabids
pip install -e ".[dev]"

Funding

Google Summer of Code Funding logo

Acknowledgments

sovabids is developed with the help of the following entities:

University of Queensland Swinburne University Universidad de Antioquia GRUNECO Neuroimaging Facility INCF

Academic Works

What does sova means?

sova is a contraction of ‘eso va’ which mean ‘that goes’ in spanish.

Nevertheless the real usage by the original developers is just to convey the idea of :

we will make it happen, we dont know how, but we will

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

sovabids-0.4.5.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

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

sovabids-0.4.5-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file sovabids-0.4.5.tar.gz.

File metadata

  • Download URL: sovabids-0.4.5.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sovabids-0.4.5.tar.gz
Algorithm Hash digest
SHA256 ef447389081459e87b9de4d5c2171db95d4ff294a7a3bbb4f2f2823ee0a594e8
MD5 c0159b2132c60c5674c6f77e87edbcd8
BLAKE2b-256 d7f2953092047c8af7a8d694b9a123f537155d9cad5d485292777aaa92b8ea87

See more details on using hashes here.

Provenance

The following attestation bundles were made for sovabids-0.4.5.tar.gz:

Publisher: publish.yml on yjmantilla/sovabids

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sovabids-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: sovabids-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 47.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sovabids-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5c19970f0f6d3f962f45d653b44835ce99febcc9e7830418fcb77cadae63e427
MD5 1af3dd0dcbdd6b2f7e746771ee8a0112
BLAKE2b-256 4d8d5cc3d7fd8e08b5bbc223070e666982035cd70db7f381ea3523f8847ef6db

See more details on using hashes here.

Provenance

The following attestation bundles were made for sovabids-0.4.5-py3-none-any.whl:

Publisher: publish.yml on yjmantilla/sovabids

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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