Coder Social home page Coder Social logo

hip-infrastructure / bids_manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dynamap/bids_manager

0.0 0.0 0.0 98.66 MB

BIDS Manage is a software aiming at importing and organising data in BIDS standard

License: GNU General Public License v3.0

Python 100.00%

bids_manager's Introduction

BIDS Manager BM

Package to collect, organise and manage neuroscience data in Brain Imaging Data Structure (BIDS) format.

Version

BIDS Manager v0.2.8

This version of BIDS Manager uses a version of BIDS Uploader which does not yet handle data transfer via SFTP, the SFTP transfer will me publicly available soon.

How to cite

  • Roehri, N., Medina Villalon, S., Jegou, A. et al. Transfer, Collection and Organisation of Electrophysiological and Imaging Data for Multicentre Studies. Neuroinform (2021). https://doi.org/10.1007/s12021-020-09503-6

Features

  • Collect data in differents format:
    • DICOM
    • Micromed (.trc)
    • Brain products (.vhdr)
    • EDF+ (.edf)
    • 4D neuroimaging
  • Organise data in BIDS format
  • Offer graphical interface to visualise/manage BIDS dataset

Main Requirements

Python library required

  • future
  • pydicom
  • PyQt5

Compiled Version for Windows 10

The compile version of BIDS Manager can be downloaded here: https://figshare.com/articles/BIDS_Manager/11728872

Example dataset

An example dataset is available here: https://figshare.com/articles/Example_Dataset_for_BIDS_Manager/11687064

Tutorial video

A tutorial video explaining you how to convert the example dataset is available HERE

Authors

License

This project is licensed under the GPLv3 license.

Comment

If you wish to compile these scripts using PyInstaller 4.0 or above, use the command below:

pyinstaller --onefile --icon=bids_manager.ico --hidden-import PyQt5.sip bids_manager/bids_manager.py

BIDS Uploader

Package to transfer data and prepare them for importation in BIDS Dataset. It can be used in local through BIDS Manager or it can be used in sFTP mode to send data to another center.

sFTP Mode

To distribute BIDS uploader to different center, you have to compile it with the good information (host(IP), port, ssh key, protocole name, and secret key). These informations have to be filled in the code generic_uploader\generic_uploader.py at the lines 239-249. Then, you can compile it with the command below:

pyinstaller --onefile --name BIDS_Uploader generic_uploader/generic_uploader.py

The executable BIDS_uploader.exe can be distributed to the centers with the following files (stored in "config" folder):

  • config\requirements.json (Requirements of the BIDS dataset)
  • config\private_ssh_key

bids_manager's People

Contributors

roehrin avatar

bids_manager's Issues

BUG: Metadata of imported iEEG is not valid

Based on BIDS-iEEG specs and the BIDS validator schema for iEEG, side-car JSON files are not allowed to use additional properties and AcquisitionDate is not part of the defined ones.

Example of error with the BIDS validator

Content of *_ieeg.json generated with BIDS_Manager 0.3.2:

{
 "TaskName": "sz",
 "Manufacturer": "Micromed",
 "PowerLineFrequency": 50,
 "SEEGChannelCount": 183,
 "RecordingDuration": 22320,
 "RecordingType": "continuous",
 "iEEGReference": "n/a",
 "SamplingFrequency": 256,
 "SoftwareFilters": "n/a",
 "AcquisitionDate": "YYYY-MM-DDThh:mm:ss"
}

Output of BIDS Validator 1.9.9:

{
    "issues":
    {
        "errors":
        [
            {
                "key": "JSON_SCHEMA_VALIDATION_ERROR",
                "severity": "error",
                "reason": "Invalid JSON file. The file is not formatted according the schema.",
                "files":
                [
                    {
                        "key": "JSON_SCHEMA_VALIDATION_ERROR",
                        "code": 55,
                        "file":
                        {
                            "name": "sub-01_ses-postop_task-sz_run-01_ieeg.json",
                            "path": "/home/stourbie/Documents/Brainhack_Cico_Cardinale_Tutorial_Dataset/sub-01/ses-postop/ieeg/sub-01_ses-postop_task-sz_run-01_ieeg.json",
                            "relativePath": "/sub-01/ses-postop/ieeg/sub-01_ses-postop_task-sz_run-01_ieeg.json",
                            "stats":
                            {
                                ...
                            }
                        },
                        "evidence": " should NOT have additional properties",
                        "line": null,
                        "character": null,
                        "severity": "error",
                        "reason": "Invalid JSON file. The file is not formatted according the schema.",
                        "helpUrl": "https://neurostars.org/search?q=JSON_SCHEMA_VALIDATION_ERROR"
                    }
                ],
                "additionalFileCount": 0,
                "helpUrl": "https://neurostars.org/search?q=JSON_SCHEMA_VALIDATION_ERROR",
                "code": 55
            }
        ],
        "warnings":
        [],
        "ignored":
        []
    },
    "summary":
    {
        ...
    }

Solution

Removing the line "AcquisitionDate": "YYYY-MM-DDThh:mm:ss" makes the BIDS validator happy.

Feature: Handle properly CT

This issue is used to keep track of changes made in BIDS_Manager to handle properly CT images as regards to the BIDS Extension Proposal 24 (BEP024): Computed tomography scan (CT).

What BIDS_Manager is currently doing

BIDS_Manager seems to be already able to handle the transformation of CT images in the BIDS format as follows:

sub-<participant_label>/
|__ [ses-<session_label>/]
    |__ anat/
       |__ sub-<participant_label>[_ses-<session_label>][_acq-<label>][_ce-<label>][_rec-<label>][_run-<index>]_CT.nii[.gz]
       |__ sub-<participant_label>[_ses-<session_label>][_acq-<label>][_ce-<label>][_rec-<label>][_run-<index>]_CT.json

This is reflected in the code here:

https://github.com/Dynamap/BIDS_Manager/blob/7fcc5f58fdade0ba38981dda50eeb332d0340a98/bids_manager/ins_bids_class.py#L1786-L1791

What BIDS_Manager should do

However, as mentioned previously, an extension of BIDS to CT is on-going (might be even frozen by looking at the date of the most recent comment), which indeed differs from the way BIDS_Manager is currently managing this modality, and which is as follows:

sub-<participant_label>/
|__ [ses-<session_label>/]
    |__ ct/
       |__ sub-<participant_label>[_ses-<session_label>][_acq-<label>][_ce-<label>][_rec-<label>][_run-<index>]_ct.nii[.gz]
       |__ sub-<participant_label>[_ses-<session_label>][_acq-<label>][_ce-<label>][_rec-<label>][_run-<index>]_ct.json

Changes

  • Feature: Add CT and CTJSON classes to ins_bids_class.py
  • Update: Add "CT" to the keylist of Subject object in ins_bids_class.py

See related changes for more detail

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.