bids-matlab

MATLAB / Octave tools for BIDS datasets

https://github.com/bids-standard/bids-matlab

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

bids closember eeg ieeg matlab meg mri neuroimaging octave pet
Last synced: 6 months ago · JSON representation ·

Repository

MATLAB / Octave tools for BIDS datasets

Basic Info
Statistics
  • Stars: 56
  • Watchers: 7
  • Forks: 34
  • Open Issues: 33
  • Releases: 3
Topics
bids closember eeg ieeg matlab meg mri neuroimaging octave pet
Created over 7 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

tests_matlab tests_octave Binder pre-commit.ci status miss hit View bids-matlab on File Exchange DOI All Contributors

BIDS for MATLAB / Octave

This repository aims at centralising MATLAB/Octave tools to interact with BIDS (Brain Imaging Data Structure) datasets.

For more information about BIDS, visit https://bids.neuroimaging.io/.

See also PyBIDS for Python and the BIDS Starter Kit.

Installation

Requirements

BIDS-MATLAB works with:

  • Octave 5.2.0 or newer
  • MATLAB R2014a or newer

We aim for compatibility with the latest stable release of Octave at any time. Compatibility can sometimes also be achieved with older versions of Octave but this is not guaranteed.

For MacOS and Unix system, using bids.copy_to_derivative requires a version of gunzip >= 1.6.

Download or clone

Download, unzip this repository and add its content to the MATLAB/Octave path.

Matlab unzip('https://github.com/bids-standard/bids-matlab/archive/main.zip'); addpath('bids-matlab-main');

Or clone it with git:

bash git clone https://github.com/bids-standard/bids-matlab.git

and then add it to your MATLAB/Octave path.

Matlab addpath('bids-matlab');

Get the latest features

Stable versions should be fetched from a specific version tag or from the Mathworkds file exchange.

A new version of BIDS matlab should be released for each new version of the BIDS specification to allow for a support of new BIDS datatypes or features.

If you want the latest features of bids-matlab that are in development are in our main branch.

To access them you can either download the main branch from there: https://github.com/bids-standard/bids-matlab/tree/main

Or clone it:

bash git clone --branch main https://github.com/bids-standard/bids-matlab.git

Features

What this toolbox can do

  • read the layout of a BIDS dataset (see bids.layout),

  • perform queries on that layout to get information about the subjects, sessions, runs, modalities, metadata... contained within that dataset (see bids.query),

  • parse the layout of "BIDS-derivative compatible" datasets (like those generated by fMRIprep),

  • create BIDS compatible filenames or folder structures for raw or derivatives datasets (bids.File, bids.util.mkdir, bids.dataset_description),

  • do basic copying of files to help initialize a derivative dataset to start a new analysis (bids.copy_to_derivative),

  • generate a human readable report of the content of BIDS data set containing anatomical MRI, functional MRI, diffusion weighted imaging, field map data (see bids.report)

  • bids.diagnostic creates summary figures listing:

    • the number of files for each subject / session and imaging modality
    • the number of trials for each trial type in each events.tsv file for a given task
  • read and write JSON files (see bids.util.jsondecode and bids.util.jsonwrite) provided that the right dependencies are installed,

  • read and write TSV files (see bids.util.tsvread and bids.util.tsvwrite)

  • access and query the BIDS schema (bids.schema)

  • access, query and create basic transformations for the BIDS statistical model (bids.Model and bids.transformers)

The behavior of this toolbox assumes that it is interacting with a valid BIDS dataset that should have been validated using BIDS-validator. If the Node.js version of the validator is installed on your computer, you can call it from the matlab prompt using bids.validate. Just be aware that any unvalidated components may produce undefined behavior. Although, if you're BIDS-y enough, the behavior may be predictable.

What this toolbox cannot do... yet

  • generate human readable reports of the content of BIDS data with EEG, MEG, iEEG, physio and events data,

What will this toolbox most likely never do

  • act as a Matlab / Octave based BIDS-validator
  • act as a BIDS converter
  • implement reading / writing capabilities for the different modality-specific data format that exist in BIDS (.nii, .eeg, .ds, .fif...)

Usage

BIDS matlab is structured as package, so you can easily access functions in subfolders that start with +.

To use the +bids/layout.m function:

Matlab BIDS = bids.layout('/home/data/ds000117'); bids.query(BIDS, 'subjects')

To use the +bids/+util/jsondecode.m function:

Matlab content = bids.util.jsondecode('/home/data/some_json_file.json');

Demos

There are demos and tutorials showing some of the features in the demos folder.

Reading and writing JSON files

Make sure to be familiar with the JSON 101.

Note some of the perks of working with JSON files described on the BIDS starterkit.

For BIDS-MATLAB, if you are using MATLAB R2016b or newer, nothing else needs to be installed.

If you are using MATLAB R2016a or older, or using Octave, you need to install a supported JSON library for your MATLAB or Octave. This can be any of:

Get in touch

To contact us:

Other tools (MATLAB only)

How to cite

To credit BIDS-Matlab in your work, please cite the Zenodo archive, which points to a permanent record of all BIDS-Matlab versions. We encourage you to mention the specific version you used.

bibtex @software{Gau_bids-matlab, author = {Gau, Rémi and Flandin, Guillaume and Janke, Andrew and Duval, Tanguy and Oostenveld, Robert and Madan, Christopher and Niso, Guiomar and Szczepanik, Michał and Mutsaerts, Henk and Beliy, Nikita and Norgaard, Martin and Pernet, Cyril and Chrisophe, Phillips and Shahzad, Iqra and Botvinik-Nezer, Rotem and Barilari, Marco and Battal, Ceren and MacLean, Michèle and Caron-Guyon, Jeanne}, license = {MIT}, title = {{bids-matlab}}, url = {https://github.com/bids-standard/bids-matlab}, doi = https://doi.org/10.5281/zenodo.5910584 }

Contributing

If you want to contribute make sure to check our contributing guidelines.

Thanks goes to these wonderful people (emoji key):

Guillaume
Guillaume

💻 🎨 📖 💡 🤔 🚇 🚧 💬 👀 ⚠️
Remi Gau
Remi Gau

💻 🎨 📖 💡 🤔 🚧 💬 👀 ⚠️
Mark Mikkelsen
Mark Mikkelsen

💻 🎨 📖 🚧 👀
Andrew Janke
Andrew Janke

💻 🎨 📖 🤔 👀 🚇
tanguyduval
tanguyduval

💻 📖 🤔
Robert Oostenveld
Robert Oostenveld

💻 📖 🤔 👀
Christopher Madan
Christopher Madan

🖋
Julia Guiomar Niso Galán
Julia Guiomar Niso Galán

👀
Michał Szczepanik
Michał Szczepanik

🚇 🤔 💻
Henk Mutsaerts
Henk Mutsaerts

💻 🤔
Nikita Beliy
Nikita Beliy

💻 🤔 👀
Martin Norgaard
Martin Norgaard

🐛 🤔
Cyril Pernet
Cyril Pernet

💻 🤔
Christophe Phillips
Christophe Phillips

🤔
CerenB
CerenB

👀
marcobarilari
marcobarilari

👀
Michèle MacLean
Michèle MacLean

🐛
Jeanne Caron-Guyon
Jeanne Caron-Guyon

🤔
Rotem Botvinik-Nezer
Rotem Botvinik-Nezer

🤔
Iqra Shahzad
Iqra Shahzad

👀
DanielaMariaPinzon
DanielaMariaPinzon

🐛
JeanLucAnton
JeanLucAnton

🐛
avanaudenhaege
avanaudenhaege

🐛
coxroy
coxroy

🐛 🤔 📓
achilleasNP
achilleasNP

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Owner

  • Name: Brain Imaging Data Structure
  • Login: bids-standard
  • Kind: organization

Citation (CITATION.cff)

# schema: https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md

cff-version: 1.2.0

title: bids-matlab

version: 0.3.0

license: MIT

repository-code: "https://github.com/bids-standard/bids-matlab"

message: "If you use this software, please cite it as below."

identifiers:
  - description:  MATLAB / Octave tools for BIDS datasets
    type: doi
    value: "10.5281/zenodo.5910584"

authors:
  - family-names: Gau
    given-names: Rémi
    orcid: https://orcid.org/0000-0002-1535-9767
    affiliation: Université catholique de Louvain

  - family-names: Flandin
    given-names: Guillaume
    orcid: https://orcid.org/0000-0003-0077-7859

  - family-names: Janke
    given-names: Andrew

  - family-names: Duval
    alias: tanguyduval
    given-names: Tanguy
    orcid: https://orcid.org/0000-0002-1228-5192

  - family-names: Oostenveld
    given-names: Robert
    orcid: https://orcid.org/0000-0002-1974-1293

  - family-names: Madan
    given-names: Christopher
    orcid:  https://orcid.org/0000-0003-3228-6501

  - family-names: Niso
    given-names: Guiomar
    orcid: https://orcid.org/0000-0001-5872-8924

  - family-names: Szczepanik
    given-names: Michał
    orcid: https://orcid.org/0000-0002-4028-2087

  - family-names: Mutsaerts
    given-names: Henk
    orcid: https://orcid.org/0000-0003-0894-0307

  - family-names: Beliy
    given-names: Nikita

  - family-names: Norgaard
    given-names: Martin
    orcid: https://orcid.org/0000-0003-2131-5688

  - family-names: Pernet
    given-names: Cyril
    orcid: https://orcid.org/0000-0003-4010-4632

  - family-names: Chrisophe
    given-names: Phillips
    orcid: https://orcid.org/0000-0002-4990-425X

  - family-names: "Shahzad"
    given-names: "Iqra"
    orcid: "https://orcid.org/0000-0002-8724-7668"
    affiliation: "Université catholique de Louvain"

  - family-names: " Botvinik-Nezer"
    given-names: "Rotem"

  - family-names: "Barilari"
    given-names: "Marco"
    orcid: "https://orcid.org/0000-0002-3313-3120"
    affiliation: "Université catholique de Louvain"

  - family-names: "Battal"
    given-names: "Ceren"
    orcid: "https://orcid.org/0000-0002-9844-7630"
    affiliation: "Université catholique de Louvain"

  - family-names: "MacLean"
    given-names: "Michèle"
    orcid: "https://orcid.org/0000-0002-0174-9326"
    affiliation: "Université de Montréal"

  - family-names: "Caron-Guyon"
    given-names: "Jeanne"
    orcid: "https://orcid.org/0000-0001-8681-5267"
    affiliation: "Université catholique de Louvain"

  - family-names: "Mikkelsen"
    given-names: "Mark"
    orcid: "https://orcid.org/0000-0002-0349-3782"
    affiliation: "Weill Cornell Medicine"

keywords:
  - MATLAB
  - Octave
  - brain imaging data structure
  - MRI
  - MRS
  - MEG
  - EEG
  - iEEG
  - PET
  - microscopy

type: software

GitHub Events

Total
  • Issues event: 5
  • Watch event: 2
  • Delete event: 24
  • Issue comment event: 11
  • Push event: 50
  • Pull request review comment event: 5
  • Pull request review event: 20
  • Pull request event: 73
  • Fork event: 1
  • Create event: 27
Last Year
  • Issues event: 5
  • Watch event: 2
  • Delete event: 24
  • Issue comment event: 11
  • Push event: 50
  • Pull request review comment event: 5
  • Pull request review event: 20
  • Pull request event: 73
  • Fork event: 1
  • Create event: 27

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 13
  • Total pull requests: 69
  • Average time to close issues: 8 months
  • Average time to close pull requests: 10 days
  • Total issue authors: 5
  • Total pull request authors: 6
  • Average comments per issue: 0.77
  • Average comments per pull request: 0.16
  • Merged pull requests: 56
  • Bot issues: 0
  • Bot pull requests: 41
Past Year
  • Issues: 3
  • Pull requests: 35
  • Average time to close issues: 3 days
  • Average time to close pull requests: 3 days
  • Issue authors: 3
  • Pull request authors: 5
  • Average comments per issue: 0.67
  • Average comments per pull request: 0.26
  • Merged pull requests: 27
  • Bot issues: 0
  • Bot pull requests: 20
Top Authors
Issue Authors
  • Remi-Gau (9)
  • kacross (1)
  • marcobarilari (1)
  • achilleasNP (1)
  • ChristophePhillips (1)
Pull Request Authors
  • github-actions[bot] (43)
  • Remi-Gau (36)
  • dependabot[bot] (19)
  • pre-commit-ci[bot] (5)
  • markmikkelsen (2)
  • allcontributors[bot] (1)
Top Labels
Issue Labels
infrastructure (1) enhancement (1)
Pull Request Labels
dependencies (19) github_actions (8) python (2)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
proxy.golang.org: github.com/bids-standard/bids-matlab
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • Sphinx *
  • sphinx-copybutton *
  • sphinx_rtd_theme *
  • sphinxcontrib-matlabdomain *
  • sphinxcontrib-napoleon *
npm-requirements.txt pypi
  • bids-validator *
requirements.txt pypi
  • jinja2 *
  • jupyterlab *
  • miss_hit ==0.9.29
  • octave_kernel *
  • pre-commit *
  • ruamel.yaml *
.github/workflows/check_md_links.yml actions
  • actions/checkout master composite
  • gaurav-nelson/github-action-markdown-link-check v1 composite
.github/workflows/codespell.yml actions
  • actions/checkout v3 composite
  • codespell-project/actions-codespell master composite
.github/workflows/run_tests_matlab.yml actions
  • actions/checkout v3 composite
  • matlab-actions/run-command v1.1.2 composite
  • matlab-actions/setup-matlab v1.2.3 composite
.github/workflows/run_tests_octave.yml actions
  • actions/checkout v3 composite
  • joergbrech/moxunit-action v1.2.0 composite
.github/workflows/update_schema.yml actions
  • actions/checkout v3 composite
  • peter-evans/create-pull-request v4 composite
.github/workflows/validate_cff.yml actions
  • actions/checkout v3 composite
  • citation-file-format/cffconvert-github-action 2.0.0 composite
package.json npm
  • all-contributors-cli ^6.24.0 development
binder/environment.yml pypi