-
Notifications
You must be signed in to change notification settings - Fork 35
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
participant information #253
Comments
So if I understood you properly, you'd like to be able to specify dynamic values for the participants.tsv file? Something like (each key is a column in the participants-table): participants:
participant_id: <<filepath:/raw/sub-(.*?)/>>
session_id: <<filepath:/raw/sub-.*?/ses-(.*?)/>>
group:
age: <<PatientAge>>
sex: <<PatientSex>>
size: <<PatientSize>>
weight: <<PatientWeight>> Currently, this info is collected in the plugins and then written to the participants-file. But that's hard coded, I guess it may indeed be useful to be able to add to that using the GUI |
Thanks for the quick reply (as always!!) Yeah, a GUI option would be nice. Indeed, it would be great to have a way to change the corresponding json file. So for example we get the sex from the DCM-Tag and also want to set the levels in the json file.
|
I will give it a try to see how it works out. Btw, do you have Presentation logfiles in your dataflow? Because in the upcoming version I added a new feature to convert that to BIDS too (i.e. to a |
Great - thanks a lot! Yes, we do have some "old" studies that have used neurons. I am happy to help and try it out! |
I played around a bit with the interface and I can make something to customize the participants.tsv file. The json-sidecar is much harder though, because of its nested structure. Yet, I understood it's the sidecar that you are after, right? Or would you also like to tweak the table? |
I know this is not easy to implement. I really appreciate your effort. |
I am still thinking about the best way to implement this, as part of a refactoring. It may take a while... |
Ok, I paved the way a bit and adjusted bidscoin such that the contents of the participant.tsv file can now be specified in the template bidsmap. What I didn't do (yet) is to make this editable in the bidseditor, and to offer a possibility to annotate the data in a json sidecar like neurobagel does. |
Thanks a lot! I just downloaded the latest version and had a first try (under macos - just saying ,-). Bidsmapper worked as expected but the bidscoiner prompted an error regarding the participants file. Traceback (most recent call last): |
Yes, that could be, because I just committed the patch without that much testing. I'll have a look |
Ok, I think I fixed it, can you try again? |
You fixing > me testing ;-) The error stays the same. Here is what I did. I guess I did something wrong:
bidsmapper sourcedata . A module that was compiled using NumPy 1.x cannot be run in If you are a user of the module, the easiest solution will be to Traceback (most recent call last): File "/Users/karlkoschutnig/opt/miniconda3/bin/bidsmapper", line 5, in Finally the coiner: INFO | -------------- START BIDScoiner 4.5.0: BIDS 1.10.0 ------------ INFO | --> Coining: [DICOM] /Volumes/data/work/bidscoin/sourcedata/sub-126BPCP021120/ses-1/007-anat-T1w-2.06/00001.dcm VERBOSE | Writing acquisition time data to: /Volumes/data/work/bidscoin/sub-126BPCP021120/ses-1/sub-126BPCP021120_ses-1_scans.tsv |
I don't know about your numpy warnings/errors, but I guess they are unrelated to the current issue. I think your installation did not install the latest code (with the path), because your error still shows the old code. That is your line 65 was: for key, value in bidsmap.dataformat(datasource.dataformat).participant: But I patched it to: for key, value in bidsmap.dataformat(datasource.dataformat).participant.items(): |
Thanks! VERBOSE | Writing acquisition time data to: /Volumes/data/work/bidscoin/sub-126BPCP021120/ses-1/sub-126BPCP021120_ses-1_scans.tsv |
Sorry to hear that, I guess you also tried the |
I guess it's a bug (or missing functionality) in pip, it only looks at the package version number when installing. So if you install from github, it doesn't look at the latest commits, and nothing will be updated if the version number (here |
Hi Marcel,
I was wondering if it would be possible to add an option in the bidseditor for specifying participant-related values. It’s great that the tool automatically generates a participants.tsv and corresponding JSON file, but it would be really helpful to be able to define variables like sex (and potentially others) directly through the interface.
For instance, the current participants.json includes a "Level" entry for age, which doesn’t quite fit unless we’re categorizing participants into discrete groups like “young” or “old.” A format similar to what’s used in the neurobagel project might be a good reference.
What do you think?
Best,
Karl
The text was updated successfully, but these errors were encountered: