[ENH]: Support parcel aggregation with eigenvariate #285

Open
opened 2023-12-14 15:59:30 +00:00 by tomug · 0 comments
tomug commented 2023-12-14 15:59:30 +00:00 (Migrated from github.com)

Are you requiring a new dataset or marker?

  • I understand this is not a marker or dataset request

Which feature do you want to include?

Parcellation is usually done by aggregating into mean time series per parcel.

SPM provides an option to aggregate using the first eigenvariate time series per parcel as briefly mentioned in the following publication: https://doi.org/10.1016/j.neuroimage.2005.08.012

"Generally, the best (minimum variance) unbiased estimate of the fROI response would involve spatially whitening the data, accounting for spatial correlations and inhomogeneity in both signal and noise.[...] We generally deal with this by taking the first eigenvariate of an fROI, which uses the temporal covariance of voxels in the fROI to find coherent spatial modes of activity (see spm_regions at http://www.fil.ion.ucl.ac.uk/spm). The principal eigenvariate is, like the average, simply a summary of the responses within an fROI. Unlike the average, it does not assume homogenous responses within the fROI."

SPM's MATLAB implementation of the first eigenvariate:
github.com/spm/spm12@3085dac00a/spm_regions.m (L179)

The Python implementation I used so far:
github.com/weidongcai/GeneralScripts@0a0253346a/Python3.5/fMRIAnalysisModule/ROIAnalysisModule.py (L17)

SPM suggests pre-whitening the data before extraction: https://en.wikibooks.org/wiki/SPM/Timeseries_extraction

"More specifically, it is the first principal component or eigenvariate of the pre-whitened, high-pass filtered and confounded-corrected timeseries in the selected region."

Pre-whitening by SPM is supposedly done in this function:
github.com/spm/spm12@3085dac00a/spm_filter.m

But I couldn't figure it out so I defaulted to demeaning the time series before generating parcels using scipy's signal class: 'voxel_ts_demean = scisig.detrend(voxel_ts_raw, type='constant')'

How do you imagine this integrated in junifer?

extend get_aggfunc_by_name function with an "eigenvariate" option

Do you have a sample code that implements this outside of junifer?

No response

Anything else to say?

No response

### Are you requiring a new dataset or marker? - [X] I understand this is not a marker or dataset request ### Which feature do you want to include? Parcellation is usually done by aggregating into mean time series per parcel. SPM provides an option to aggregate using the first eigenvariate time series per parcel as briefly mentioned in the following publication: https://doi.org/10.1016/j.neuroimage.2005.08.012 "Generally, the best (minimum variance) unbiased estimate of the fROI response would involve spatially **whitening** the data, accounting for spatial correlations and inhomogeneity in both signal and noise.[...] We generally deal with this by taking the **first eigenvariate** of an fROI, which uses the temporal covariance of voxels in the fROI to find coherent spatial modes of activity (see **spm_regions** at http://www.fil.ion.ucl.ac.uk/spm). The principal eigenvariate is, like the average, simply a summary of the responses within an fROI. Unlike the average, it does not assume homogenous responses within the fROI." SPM's MATLAB implementation of the first eigenvariate: https://github.com/spm/spm12/blob/3085dac00ac804adb190a7e82c6ef11866c8af02/spm_regions.m#L179 The Python implementation I used so far: https://github.com/weidongcai/GeneralScripts/blob/0a0253346acffc21849c1f66f4fb2bf7ac79e8de/Python3.5/fMRIAnalysisModule/ROIAnalysisModule.py#L17 SPM suggests pre-whitening the data before extraction: https://en.wikibooks.org/wiki/SPM/Timeseries_extraction "More specifically, it is the first principal component or eigenvariate of the pre-whitened, high-pass filtered and confounded-corrected timeseries in the selected region." Pre-whitening by SPM is supposedly done in this function: https://github.com/spm/spm12/blob/3085dac00ac804adb190a7e82c6ef11866c8af02/spm_filter.m But I couldn't figure it out so I defaulted to demeaning the time series before generating parcels using scipy's signal class: 'voxel_ts_demean = scisig.detrend(voxel_ts_raw, type='constant')' ### How do you imagine this integrated in junifer? extend get_aggfunc_by_name function with an "eigenvariate" option ### Do you have a sample code that implements this outside of junifer? _No response_ ### Anything else to say? _No response_
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer#285
No description provided.