Forum

Notifications
Clear all

DataType in snirf conversion and bids structure

3 Posts
2 Users
0 Likes
191 Views
Posts: 6
Topic starter
(@giulia-rocco)
Active Member
Joined: 11 months ago

Hi, 

I am converting my .nirs files into .snirf to subsequently organize my data in BIDS. I am using the standalone command:

SnirfClass(load('filename.nirs', '-mat'))

It works correctly and I am able to save the .snirf later. However, I have noticed when I perform the BIDS conversion later (with Fieldtrip) that the dataTypeLabel is not specified. In other words, how can I specify that I am converting raw DC data, and not dOD or dHb? I attach a screenshot to show the empty string corresponding to dataTypeLabel (normally, it should have been 'raw-DC').

I have another question. After the BIDS conversion with Fieldtrip, my snirf class contains an additional class named 'bids', which contains in turn a cell array with the events and the stimulation parameters. Is that compliant with the BIDS standards? 
(I still have to figure out why the StimClass is empty after the BIDS conversion, but this is a Fieldtrip issue)

Please find here the original .nirs file and the .snirf files (before and after BIDS conversion):

https://drive.google.com/drive/folders/1NT5HJaYGHSwLOIx0L6OOXMIz0snd_okQ?usp=sharing

My Matlab version is 2017b and my OS is Windows 10.

Thank you in advance.

 

Topic Tags
2 Replies
Posts: 284
(@dboas)
Joined: 3 years ago

It is great that FieldTrip is supporting the BIDS conversion. Can you get the developers of FieldTrip engaged in this discussion so we can get convergence on these conversion tools. It sounds like there are some issues doing the conversion to make it BIDS compliant.

My group has a snirf2bids converter on github here. We've been working through some compatability issues, but I think it is working well. Give that a shot and let us know if you are having any issues with that.

Reply
Posts: 6
Topic starter
(@giulia-rocco)
Active Member
Joined: 11 months ago

Hi, 

Thank you for your reply. I will write to the email discussion list of Fieldtrip and try to get them involved.

I tried the snirf2bids converter and it seemed to work well. I have just noticed that the NIRSCoordinateSystem (metadata) in the *_coordsystem.json file is left blank(" "). Somehow it couldn't be retrieved, but the montage was created with NIRSite (NIRx) on the ICBM152 adult template so I guess the value should be "MNILin152".

However, I submitted my dataset to an online bids validator for quick evaluation ( https://bids-standard.github.io/bids-validator/)  and I have a few comments:

  • the name of some of the sidecar files (*_coordsystem.json, *_optodes.tsv, *_optodes.json) was not considered compliant. I have tried changing them manually and submitting them again to the validator and the error was fixed. To be more explicit, the *_nirs.snirf, *_nirs.json, *_events.json, *_events.tsv, *_events.json, *_channels_tsv are named in this way: sub-0*_taskname_run-*_filetype .
    While the other sidecar files are named: sub-0*_run-*_filetype (without the task name)
  • Three types of events are present in our snirf file in the StimClass, respectively named '1', '2', and '3' in the snirf.stim.name. Specifically, the first two types identify the two task conditions. The third type is the trigger corresponding to the first pulse of the MRI scanner (as we did simultaneous fNIRS/fMRI), thus it is a unique event. Even if it is correctly present in the StimClass, the event does not appear in the *_events.tsv
  • The snirf file does not contain the struct called bids which is sometimes contained in some sample datasets I found online and created by other toolboxes. Is this mandatory according to the BIDS Standards? This is not clear to me yet.

If you want to have a look at one example of output from snirf2bids, here is it:

https://drive.google.com/drive/folders/1pVULtEq0IRTuYGR-QVqDuZtftHoIkuuv?usp=sharing

Thank you in advance.

Reply
Share:
en_USEnglish