Skip to main content

Resting state HRF estimation and deconvolution

PyPI version

Please refer to https://github.com/compneuro-da/rsHRF for MATLAB version

BOLD HRF

The basic idea

This toolbox is aimed to retrieve the onsets of pseudo-events triggering an hemodynamic response from resting state fMRI BOLD voxel-wise signal. It is based on point process theory, and fits a model to retrieve the optimal lag between the events and the HRF onset, as well as the HRF shape, using a choice of basis functions (the canonical shape with two derivatives, (smoothed) Finite Impulse Response, mixture of gammas).

BOLD HRF

Once that the HRF has been retrieved for each voxel, it can be deconvolved from the time series (for example to improve lag-based connectivity estimates), or one can map the shape parameters everywhere in the brain (including white matter), and use the shape as a pathophysiological indicator.

HRF map

How to use the toolbox

The input is voxelwise BOLD signal, already preprocessed according to your favorite recipe. Important thing are:

  • bandpass filter in the 0.01-0.08 Hz interval (or something like that)
  • z-score the voxel BOLD time series

To be on the safe side, these steps are performed again in the code.

The input can be images (3D or 4D), or directly matrices of [observation x voxels].

It is possible to use a temporal mask to exclude some time points (for example after scrubbing).

The demos allow you to run the analyses on several formats of input data.

Python Package and BIDS-app

A BIDS-App has been made for easy and reproducible analysis. Its documentation can be accessed at:

https://bids-apps.neuroimaging.io/rsHRF/

Collaborators

  • Guorong Wu

  • Nigel Colenbier

  • Sofie Van Den Bossche

  • Daniele Marinazzo

  • Madhur Tandon (Python - BIDS)

  • Asier Erramuzpe (Python - BIDS)

  • Amogh Johri (Python - BIDS)

  • Demir Ege Ortaç (Python)

  • Giulio Tani Raffaelli (Python)

Docker Usage

You can run rsHRF as a containerized BIDS App using Docker. This avoids the need to install Python dependencies locally and ensures reproducibility.

1. Pull the Docker image:

docker pull bids/rshrf:latest

2. Run the analysis:

To run the analysis on a BIDS derivative dataset, such as an fMRIPrep derivatives directory, use the BIDS Apps-style command structure:

docker run -ti --rm \
  -v /path/to/your/bids_derivative_dataset:/data:ro \
  -v /path/to/your/output_dir:/out \
  bids/rshrf:latest \
  /data \
  /out \
  participant \
  --participant-label 01 \
  -m BIDS \
  --estimation canon2dd

For reproducible analyses pin a version tag such as bids/rshrf:v1.8.0.

Here, /data should point to the BIDS derivative dataset containing files such as dataset_description.json, preprocessed BOLD images, and brain masks. The participant label should be provided without the sub- prefix.

References

  1. Wu, G. R., Colenbier, N., Van Den Bossche, S., Clauw, K., Johri, A., Tandon, M., & Marinazzo, D. (2021). rsHRF: A toolbox for resting-state HRF estimation and deconvolution. Neuroimage, 244, 118591. open access journal page

  2. Guo-Rong Wu, Wei Liao, Sebastiano Stramaglia, Ju-Rong Ding, Huafu Chen, Daniele Marinazzo*. "A blind deconvolution approach to recover effective connectivity brain networks from resting state fMRI data." Medical Image Analysis, 2013, 17:365-374. Open access institutional repo

  3. Guo-Rong Wu, Daniele Marinazzo. "Sensitivity of the resting state hemodynamic response function estimation to autonomic nervous system fluctuations." Philosophical Transactions of the Royal Society A, 2016, 374: 20150190. Open access institutional repo

Metadata

Release files for rshrf 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rshrf 1.8.0
File Size Uploaded Provenance
rshrf-1.8.0.tar.gz 66.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rshrf 1.8.0
File Interpreter ABI Platform
rshrf-1.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 148.1 kB

Release files / rshrf-1.8.0.tar.gz

Download URL rshrf-1.8.0.tar.gz
Size 66.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a7f57ac614fc6d396d30c6f47f1f3c1d52eb579eccf0dd5b5b1b27765867698a
BLAKE2b-256 checksum
How to use checksums
7041abaca76993812480860a4c8edceb6fc68e2ad4ec3bd8a992804d44ade47a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / rshrf-1.8.0-py3-none-any.whl

Download URL rshrf-1.8.0-py3-none-any.whl
Size 81.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c5442d38920e35f1bece516e9fbd9b99ead94ec9ee99d697315e2bd67c71850
BLAKE2b-256 checksum
How to use checksums
622b9a7ccef8b0d88715dc5bde31f3c44d44c766633d8dfc682f6d0da5856ae8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for rshrf 1.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page