I want to use bidscoin to convert my sourcedata to rawdata. I tried to figure out how to edit my bidsmap.yaml
file in such a way, that it uses regular expressions to capture certain information from DICOMs in order to create rules on how to map these information to the output. Of course, I could use the bidseditor and select all matching files using shift + select and do this manually, but this seems very error-prone for a large dataset.
If I am not mistaken this part of the documentation describes this in detail but I still don’t understand where in the file I have to make the changes, how they have to be formatted and what content hey have to have.
For example, I would like to have the following logic:
“Whenever the series description field in the DICOM is equal to “nback_PA_cmrr_mbep2d_bold_AF6”, set the task field to “nback”. Do this for every file you find in the sourcedata folder, independent of a specific subject”
OR
“Whenever the series description in the DICOM is equal to “t1_mprage_sag_p2_iso”, don’t set anything in the acq field”.
Don’t know if this helps, but here’s a screenshot of the BIDS editor after running:
bidsmapper sourcedata/ rawdata/ --sesprefix "*" -s
`
Answering my own question: My sourcedata folder contains data from multiple studies (subjects took part in multiple studies). That led to a lot of provenance fieds (each representing a unique constellation of settings). I thus just deleted all the provenance except for the data of my study.
I’m on vacation now, so I can’t look into your question in detail right now. However, if you have multiple types of scans, then Bidcoin indeed attempts to classify them all. In general, BIDScoin creates a shortlist of scan types that is independent of subjects/sessions. Instead of deleting your data, you can also hide it by putting a dot at the start of the folder or filename
Yeah, it took me a while to understand that the provenance fields just represent unique scanner settings (not all the found data) representative for a set of files
Ah that’s good to know? Where exactly can I put the dot?
But deleting the files will not actually delete them right? They just will be ignored in the BIDS-Conversion? Because I only want to BIDS-concert the files that belong to my study of interest.
Ah you mean, the folders themselves right? I was talking about the “delete” function from the bidseditor. But that would require a prior sort using dicomsort. For now I just set all the files that I don’t want to have in my rawdata folder to “exclude”?
If you just want to exclude / skip data in the conversion, you can put a dot at the start of the file/doldername (i.e. linux style of hidden files/folders) or you can perhaps have a look at this solution:
Can the conversion of extra_data be skipped? · Issue #275 · Donders-Institute/bidscoin · GitHub. BIDScoin never ever deletes your data (you probably don’t want to delete mappings from your bidsmap, because normally that only makes the bidsmap less smart)