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.
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).
- Documentation: https://hip-infrastructure.github.io/datahipy/
- Source: https://github.com/HIP-infrastructure/datahipy
- Bug reports: https://github.com/HIP-infrastructure/datahipy/issues
-
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
🚀!
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.
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
Create a new Datalad-controlled BIDS dataset.
Create a version tag in a Datalad-controlled BIDS dataset.
Get the list of existing version tags for a Datalad-controlled BIDS dataset.
Checkout a Datalad-controlled BIDS dataset at a specific tag, the master branch, or the HEAD.
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.
Get a JSON summary of the BIDS dataset consisting of all fields, participants, and existing entities.
Get a list of JSON BIDS dataset summaries present in a given directory.
Publish a Datalad-controlled BIDS dataset to the HIP public space.
Clone a Datalad-controlled BIDS dataset from the HIP public space to the private space of the user.
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.
Get information about data available for a given participant of a dataset.
Edit the participant's information stored in the participants.tsv
tabular file.
Remove a participant from a given BIDS dataset. The record will be deleted from the participants.tsv
tabular file.
Remove data file(s) from a BIDS dataset.
Create a new Datalad-controlled project dataset in the collaborative space of the HIP.
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
).
Import an existing document from the center space of the HIP to the documents/
folder of the project.
Create a version tag in a Datalad-controlled project dataset.
Get the list of existing version tags for a Datalad-controlled project dataset.
Checkout a Datalad-controlled project dataset at a specific tag, the master branch, or the HEAD.
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.
Commandline Usage documentation page provides more documentation about the inputs and outputs of the above commands.
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).
Thanks goes to these wonderful people (emoji key):
Sébastien Tourbier 🐛 💻 🎨 📖 💡 🤔 🚇 🚧 🧑🏫 👀 |
Manuel Spuhler 🐛 💻 🎨 📖 💡 🤔 🚧 🧑🏫 👀 |
iDmple 🐛 💻 🎨 📖 💡 🤔 |
AnthonyAMU 💻 🎨 📖 💡 🤔 |
BSchaffhauser 💵 🔍 |
This project follows the all-contributors specification. Contributions of any kind welcome!