The proc setting in the MNE-BIDS-Pipeline config

Hi there,
Question… I’m looking through the config.py file in your pipeline, and I see
proc: Optional[str] = None
“”"
The BIDS processing entity.

What do you use for this? I have data processed by maxfilter, so our pre-BIDS filenames include ‘tsss’ and ‘mc’ tags.

Thanks,
Megan

Hello @mschendel,

[I moved your posting to a new topic]

if your input data has already been Maxwell-filtered and this is indicated via proc-tsss in the filenames, you’d set proc = 'tsss' in the configuration file.

The mc label you mention, is that for “movement correction”? How do you currently name your files where MaxFilter with movement correction has been applied? Personally, I would simply add the proc-(t)sss entity to the filename and document whether or not movement correction has been applied as part of MaxFilter. But I’d be interested to know how you’re currently handling this in your lab.

Thanks,
Richard

Hello,
Yes, it has already been maxfiltered including movement compensation (mc). So our native file format has something like Subject_task_run#_tsss_mc.fif

How do you all document your maxfilter processing?

I am trying to use the MNE-BIDS tool, but it doesn’t seem to like the proc parameter used in the BIDSPath. Lucky me, it looks like you’re the main author of BIDSPath. I would have asked in an MNE-BIDS specific forum, but I couldn’t find anywhere like that.

I may also try to use the symbolic link parameter and capture the unprocessed data in my BIDS structure, too.

Thanks,
Megan

I’m not the author of BIDSPath; it was @adam2392 who initially added this to MNE-BIDS :slight_smile:

As for your file names, I’d suggest to add proc-tsss or, if you insist on adding the MC as well, to use proc-tsss+mc

Adding a + is something we’ve adopted in various places of the BIDS Pipeline

In the config, you can then simply set proc = ‘tsss+mc’

@richard @sappelhoff
Basically, we can save the files that have been processed or “cleaned” into MNE-BIDS format now ?

Thanks

Hi Richard,
Oh, gotcha. You way want to review this document page which makes it look like you are the author : bidspath

I didn’t see anywhere in the BIDS documentation for how they record their maxfiltering parameters. Does the mne pipeline team have any suggestions for this?

Thanks,
Megan

Yes and no.

MNE-BIDS now supports writing files that have been loaded and potentially modified in memory; see the changelog of version 0.8.

That said, derivatives are still not properly specified by BIDS.

This is only meant to indicate that I authored this tutorial :slight_smile:

There’s an example in the BIDS spec for the filenames, MEG file formats - Brain Imaging Data Structure v1.6.0

sub-control01_ses-001_task-rest_run-01_proc-sss_meg.fif
sub-control01_ses-001_task-rest_run-01_proc-sss_meg.json

Another bit of the spec discusses possible values of the proc entity:

The proc label is analogous to rec for MR and denotes a variant of a file that was a result of particular processing performed on the device. This is useful for files produced in particular by Elekta’s MaxFilter (for example, sss, tsss, trans, quat or mc), which some installations impose to be run on raw data because of active shielding software corrections before the MEG data can actually be exploited.

It doesn’t mention how to combine multiple “procs”, as in, “MaxFilter and movement correction”. In the BIDS Pipeline, we would concatenate multiple parameter values that belong to the same BIDS entity via + signs; following this (non-standardized!!) approach in the case of tSSS and movement correction, this would become proc-tsss+mc. An example filename would then for example look like:

sub-001_ses-001_task-visual_run-01_proc-tsss+mc_meg.fif
1 Like