Intro to sovabids

  • sovabids is a python package for automating eeg2bids conversion.

  • sovabids can be used through:
    1. its python API

    2. its CLI entry points.

    3. its JSON-RPC entry points (needs a server running the backend).

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.

Installation

git clone https://github.com/yjmantilla/sovabids.git
cd sovabids
pip install .

Installation for advanced usage

Run

git clone https://github.com/yjmantilla/sovabids.git
cd sovabids
pip install -r requirements-dev.txt

Notice that the requirements-dev.txt file already has the sovabids installation using editable mode.

Installation for developers

Fork this repo and run:

git clone https://github.com/<gh-username>/sovabids.git
cd sovabids
pip install -r requirements-dev.txt

Notice that the requirements-dev.txt file already has the sovabids installation using editable mode.

Basic Usage

The easiest way is to use sovabids through its CLI entry-points as follows:

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

Funding



Acknowledgments

sovabids is developed with the help of the following entities: