So what are people using to process their BIDS physio files in to regressors for Fitlins?

Hi all,

Hopefully a quick question. What are folks using to generate physio regressors for Fitlins?



1 Like

Hi Shotgunosine,

I think this is a problem that still needs to be addressed a bit by the open source neuroimaging community. There are no easy solutions afaik.

One solution for you might be the PhysIO-toolbox of the Tapas software suite:

You will, however, need SPM and MatLab, and there is quite some manual checking to be done.

I used to use the FSL solution, but it ain’t pretty when you like things like Python and BIDS:



Another possibility is the phys2bids package in Python:

It is still under development, but it might fit your purposes.
Contact us or open an issue if you are interested.



@CesarCaballeroGaudes I looked into phys2bids and wasn’t sure if it would do what I wanted, specifically process physio files in to regressors that could be used with something like fitlins.

I submitted a tweak to AFNI’s so that you can run that script on a BIDS formatted _physio.tsv.gz and JSON sidecar. If you use the -phys_file flag to specify the path to the physio .tsv then it will look for the associated json, and use the labels in that json to parse the columns. I haven’t done anything to tweak the output yet, suggestions are welcome. Since I’m using fMRIPrep, slicetime correction to the middle of the TR has already been done. The following command should output a set of regressors that will work with that:
        -phys_file sub-20900_ses-01_task-rest_run-1_physio.tsv.gz
        -v 2.5
        -n 1
        -p 50
        -slice_order custom
        -slice_offset [1250]
        -prefix physio_regressors.1D

Thank you so much. I was not aware of this feature.

I think that, once it’s up and running, phys2denoise will generate the regressors you want, with an eye specifically toward BIDS integration. I believe that the physiopy devs are planning to fill that package out once phys2bids is stable.