Skip to content

Latest commit

 

History

History
181 lines (124 loc) · 11.6 KB

README.md

File metadata and controls

181 lines (124 loc) · 11.6 KB

DataHIPy logo

Copyright © 2022-2023 The HIP team, University Hospital of Lausanne (CHUV), Switzerland & Contributors, All rights reserved.

This software is distributed under the open-source Apache 2.0 license. See LICENSE file for details.


Latest GitHub Release Latest GitHub Release Date Digital Object Identifier (DOI) CI/CD codecov Docs All Contributors

DataHIPy is an open-source tool written in Python and encapsulated in a Docker image to handle neuroimaging data on the Human Intracranial EEG Platform (HIP) following Brain Imaging Data Structure (BIDS).

Resources

Installation

  • Install Docker engine (See instructions)

  • Clone this repository and go to the datahipy directory:

    $ git clone https://github.com/HIP-infrastructure/DataHIPy.git
    $ cd DataHIPy
  • Checkout submodules:

    $ git submodule update --recursive --init
  • Build the Docker image:

    $ make -B build-docker
  • You are ready to use DataHIPy 🚀!

Test

Run test/run_tests.sh in a terminal:

$ sh test/run_tests.sh

After completion, coverage report in HTML format can be found in test/report/cov_html and be displayed by opening index.html in your favorite browser.

Usage

The tool can be easily run as follows:

usage: datahipy [-h]
                [--command {dataset.create,dataset.get,dataset.create_tag,dataset.get_tags,dataset.checkout_tag,datasets.get,sub.get,sub.import,sub.edit.clinical,sub.delete,sub.delete.file,project.create,project.sub.import,project.doc.import,project.create_tag,project.get_tags,project.checkout_tag}]
                [--input_data INPUT_DATA] [--output_file OUTPUT_FILE]
                [--dataset_path DATASET_PATH] [--input_path INPUT_PATH] [-v]

DataHIPy command line interface.

optional arguments:
    -h, --help            show this help message and exit
    --command {dataset.create,dataset.get,dataset.create_tag,dataset.get_tags,dataset.checkout_tag,datasets.get,sub.get,sub.import,sub.edit.clinical,sub.delete,sub.delete.file,project.create,project.sub.import,project.doc.import,project.create_tag,project.get_tags,project.checkout_tag}
                        Method to be run.
    --input_data INPUT_DATA
                        Input JSON data
    --output_file OUTPUT_FILE
                        File location after processing
    --dataset_path DATASET_PATH
                        Path to the dataset
    --input_path INPUT_PATH
                        Path to the input data (e.g. input_data.json)
    -v, --version         show program's version number and exit

Commands

Dataset

dataset.create

Create a new Datalad-controlled BIDS dataset.

dataset.create_tag

Create a version tag in a Datalad-controlled BIDS dataset.

dataset.get_tags

Get the list of existing version tags for a Datalad-controlled BIDS dataset.

dataset.checkout_tag

Checkout a Datalad-controlled BIDS dataset at a specific tag, the master branch, or the HEAD.

dataset.release_version

Make a patch (1.0.0->1.0.1) / minor (1.0.0->1.1.0) / major (1.1.0->2.0.0) version release of a Datalad-controlled BIDS dataset.

dataset.get

Get a JSON summary of the BIDS dataset consisting of all fields, participants, and existing entities.

datasets.get

Get a list of JSON BIDS dataset summaries present in a given directory.

dataset.publish

Publish a Datalad-controlled BIDS dataset to the HIP public space.

dataset.clone

Clone a Datalad-controlled BIDS dataset from the HIP public space to the private space of the user.

Participant

sub.import

Import and update files for a given participant into an existing BIDS dataset. An appropriate record is added/updated to the participants.tsv tabular file if needed.

sub.get

Get information about data available for a given participant of a dataset.

sub.edit.clinical

Edit the participant's information stored in the participants.tsv tabular file.

sub.delete

Remove a participant from a given BIDS dataset. The record will be deleted from the participants.tsv tabular file.

sub.delete.file

Remove data file(s) from a BIDS dataset.

Project

project.create

Create a new Datalad-controlled project dataset in the collaborative space of the HIP.

project.sub.import

Import an existing sub-<participant_label> folder from a BIDS dataset of the center space of the HIP to the BIDS dataset of the project (located in <project_directory>/inputs/bids-dataset).

project.doc.import

Import an existing document from the center space of the HIP to the documents/ folder of the project.

project.create_tag

Create a version tag in a Datalad-controlled project dataset.

project.get_tags

Get the list of existing version tags for a Datalad-controlled project dataset.

project.checkout_tag

Checkout a Datalad-controlled project dataset at a specific tag, the master branch, or the HEAD.

project.release_version

Make a patch (1.0.0->1.0.1) / minor (1.0.0->1.1.0) / major (1.1.0->2.0.0) version release of a Datalad-controlled project dataset and its nested BIDS dataset.

More documentation

Commandline Usage documentation page provides more documentation about the inputs and outputs of the above commands.

Acknowledgement

This research was supported by the EBRAINS research infrastructure, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3).

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Sébastien Tourbier
Sébastien Tourbier

🐛 💻 🎨 📖 💡 🤔 🚇 🚧 🧑‍🏫 👀 ⚠️
Manuel Spuhler
Manuel Spuhler

🐛 💻 🎨 📖 💡 🤔 🚧 🧑‍🏫 👀 ⚠️
iDmple
iDmple

🐛 💻 🎨 📖 💡 🤔
AnthonyAMU
AnthonyAMU

💻 🎨 📖 💡 🤔
BSchaffhauser
BSchaffhauser

💵 🔍

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