Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleting BIDS like participants.json without warning #319

Open
Remi-Gau opened this issue Oct 7, 2022 · 2 comments
Open

deleting BIDS like participants.json without warning #319

Remi-Gau opened this issue Oct 7, 2022 · 2 comments

Comments

@Remi-Gau
Copy link

Remi-Gau commented Oct 7, 2022

That must be me not understanding how bidsmri2nidm but I was trying to annotate a BIDS dataset

bidsmri2nidm -d . -bidsignore

that already contained a participants.json file formatted à la BIDS

{
    "participant_id": {
        "LongName": "participant ID"
    },
    "Age": {
        "LongName": "age",
        "Units": "years from birth"
    },
    "Sex": {
        "LongName": "gender",
        "Levels": {
            "1": "male",
            "0": "female"
        }
    },
    "Educational level": {
        "LongName": "educational level",
        "Units": "number of years completed at school"
    },
    "Smoker": {
        "LongName": "smoker",
        "Levels": {
            "1": "smoker",
            "0": "non-smoker"
        }
    },
    "Medication": {
        "LongName": "medication",
        "Description": "subject was taking some sort of prescribed medication during the time of the study",
        "Levels": {
            "1": "on medication",
            "0": "no medication"
        }
    },

...

I did not want to run the whole annotation so I ctrl+C after a few terms but now I found myself with a participants.json that only has the terms that I have annotated.

I may be useful to allow for a way to quit more gracefully and without losing all the rest of the content of the participants.json file.

@dbkeator
Copy link
Contributor

Hi,
It typically would load the existing json file but it only loads keys that are defined in either the BIDS json format or the reproschema formats. I see "LongName" is now a valid key in the BIDS JSON format but that's probably and update I missed along the way. Here are the examples we worked with: https://github.com/NIDM-Terms/terms/tree/master/terms/OpenNeuro_Datasets_Terms/OpenNeuro_BIDS_json_sidecar

Anyway, I agree, a more graceful way of exiting would be good. I'll use your example for testing and submit an update...

@Remi-Gau
Copy link
Author

awesome
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants