[ENH]: Support parcel aggregation with eigenvariate #285
Labels
No labels
CRITICAL
Stale
WIP
bug
concept
coordinate
dataset
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
maintenance
maps
marker
mask
on hold
parcellation
preprocess
question
ready
storage
template-space
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
juaml/junifer#285
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Are you requiring a new dataset or marker?
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.mBut 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