Donders-Institute / bidscoin

BIDScoin converts your source-level neuroimaging data to BIDS
https://bidscoin.readthedocs.io
GNU General Public License v3.0
130 stars 35 forks source link

Philips MRS data: Need help mapping *_act.sdat and *_ref.sdat to *_svs.nii and *_ref.nii #154

Closed schorschinho closed 2 years ago

schorschinho commented 2 years ago

General summary First of all, thank you for this wonderful tool. I've had a fun couple of days playing around with it and I'm sure it will feature prominently in my future workflows!

I'm still getting acquainted with editing the bidsmap directly. I'm trying to map Philips MRS data, which come in pairs of SDAT/SPAR. The main data is stored in files ending with _act.sdat, and water references are stored in files ending with _ref.sdat. I want to map these so that _act.sdat files are converted to _svs.nii and _ref.sdat to _ref.nii, according to the BIDS-MRS extension proposal conventions. This information cannot be inferred from the header or the scan ID, so I need to pluck it from the filename. But no matter what I specify in the bidsmap, the bidsmap editor only shows me the _act type, and treats the _ref files as runs of the same type.

dbiex_4_2_raw_act.sdat # main data 
dbiex_4_2_raw_act.spar # main header
dbiex_4_2_raw_ref.sdat # water reference data 
dbiex_4_2_raw_ref.spar # water reference header

I want these to map to _svs.nii and _ref.nii (no run distinction), but instead I'm getting

sub-001_acq-press30_run-1_svs.nii # main data 
sub-001_acq-press30_run-1_svs.json
sub-001_acq-press30_run-2_svs.nii # water reference data
sub-001_acq-press30_run-2_svs.json

I have tried using raw_act and raw_ref in the filename field of properties in the bidsmap, but that doesn't seem to do it.

Would you mind giving me a hand while I decipher the art of writing a good bidsmap?

Thanks a lot, Georg

schorschinho commented 2 years ago

I've figured it out - my wildcard was poorly defined. Using '.*raw_act.*' and '.*raw_ref.*' finally did it correctly.

marcelzwiers commented 2 years ago

Thanks, sorry I was too late to help out, but don't hesitate to ask for help again (creating template bidsmaps does require some more advanced understanding of how bidscoin works behind the GUI)