How to use .trk file produced by QSIRecon with "----recon_spec pyafq_tractometry" to extract properties of custom fMRI imaging

Hi, eyeryone!
The DTI images have been preprocessed using qsiprep and reconstructed using the pyafq workflow of qsirecon (“----recon_spec pyafq_tractometry”), obtaining .trk files and .csv file that including 100 FA or MD values within a bundle. Now, I want to extract the 100 sampled tract profiles from the fmri images using these tract bundle. How can I achieve this? Assuming that the coordinate systems of the fmri and dmri are both in the individual’s T1 space.
Thank you,
Zhiyuan

Hi @zychen,

Can you explain what you mean by this? Do you mean using a fMRI GLM stat map? DIPY has an API for making tract profiles: DIPY — dipy 1.8.0 documentation. You can do something similar to that example but instead of FA, use your stat map.

Keep in mind that the DWI is rotated to ACPC orientation, so you’d need your fMRI derivatives to be also.

Best,
Steven

1 Like

Hi @Steven ,
Thank you very much! It’s just what I need. But I still have a question. Whether all the streamlines in each bundle generated by Qsiren’s pyAFQ workflow are oriented the same way.
zhiyuan

Hi @zychen,

I believe they are, but I’d still do the orientation just in case. There might have been bugs in pyafq bundled with earlier qsirecon versions that had orientation bugs.

Best,
Steven

1 Like