Skip to main content

fMRI-QCtoolkit

fMRI-QCtoolkit is a Python package for the quality control (QC) of preprocessed fMRI data. It combines your visual ratings of each participant's QC report with the quantitative metrics from AFNI or MRIQC, and shows both in an interactive dashboard where you filter runs, look at them in a table and in plots, and download the ones you keep. It works with the outputs of fMRIPrep and AFNI's afni_proc.py.

Handbook: https://qiuyuyu3.github.io/fMRI-QCtoolkit/

workflow

Install

Python 3.11 or newer is required. Create or activate a virtual environment, then install from PyPI:

pip install fmri-qctoolkit

Quick start

1. Rate

Rate AFNI output in AFNI's APQC report:

fmriqc rating afni \
    --input-dir /PATH/AFNI_derivatives \
    --subjects "001,002" \
    --task rest \
    --prefix sub-

AFNI rating

Rate fMRIPrep output in the toolkit's rating page, on top of the fMRIPrep report:

fmriqc rating fmriprep \
    --input-dir /PATH/fmriprep \
    --subjects "001,002" \
    --output-dir /PATH/ratings

fMRIPrep rating

2. Prepare

Collect the ratings and the metrics into one table, df_final.csv. For fMRIPrep, the metrics come from MRIQC's group_bold.tsv.

fmriqc prep afni \
    --input-dir /PATH/AFNI_derivatives \
    --task rest \
    --prefix sub- \
    --output-dir /PATH/QC
fmriqc prep fmriprep \
    --bold-file /PATH/mriqc/group_bold.tsv \
    --rating-dir /PATH/ratings \
    --task rest \
    --output-dir /PATH/QC

3. View

fmriqc dashboard fmriprep \
    --data-file /PATH/QC/df_final.csv \
    --task rest

For AFNI, use fmriqc dashboard afni with the same options. Open the link printed in the terminal. Runs rated bad on any metric are hidden at first; the filters on the left change which runs are shown.

The Table tab lists the runs. Select some and download them.

Table tab

The Plots tab shows the ratings as heatmaps and the metrics as a lollipop chart.

Heatmaps

Lollipop chart

The Settings tab chooses the metrics shown and the thresholds that rate them.

Settings tab

The screenshots show simulated data.

On an HPC cluster

Start a remote desktop session on the cluster (such as XDesktop or an Open OnDemand desktop), open a terminal in it, and load Firefox before running the commands above:

ml Firefox

The rating pages open in Firefox. For the dashboard, copy the printed link into Firefox. Module names differ between clusters; module avail firefox lists yours. To rate AFNI output, load AFNI as well. More in Opening the pages.

Documentation

Citation

A paper describing fMRI-QCtoolkit is in preparation. Until then, cite the software with the details in CITATION.cff ("Cite this repository" on GitHub). The tools and papers to cite along with it are listed in the handbook.

License

Apache License 2.0

Metadata

Release files for fmri-qctoolkit 2.0.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 fmri-qctoolkit 2.0.0
File Size Uploaded Provenance Actions
fmri_qctoolkit-2.0.0.tar.gz 110.1 kB With provenance Details for fmri_qctoolkit-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fmri-qctoolkit 2.0.0
File Interpreter ABI Platform Actions
fmri_qctoolkit-2.0.0-py3-none-any.whl Python 3 none any Details for fmri_qctoolkit-2.0.0-py3-none-any.whl

Total release size: 178.4 kB

Release files / fmri_qctoolkit-2.0.0.tar.gz

Download URL fmri_qctoolkit-2.0.0.tar.gz
Size 110.1 kB
Tags Source
SHA-256 checksum
How to use checksums
218b9fe0a3274897fc8929eb39af43415d6ba804362a426c0e2aef04fdc86a27
BLAKE2b-256 checksum
How to use checksums
deaa8ed0428fb9021e332a8231b6cc9aa7517f01f96fc4ac906acbd403d438d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / fmri_qctoolkit-2.0.0-py3-none-any.whl

Download URL fmri_qctoolkit-2.0.0-py3-none-any.whl
Size 68.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16d36c0f65c9b2562d23e3e471d8d786043393b5f36ceff0c4350f2c6fdeb838
BLAKE2b-256 checksum
How to use checksums
6814a2ab353a39d10a5593a36414717c87926bfc57ef5631aeda86d3cba6a5e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for fmri-qctoolkit 2.0.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fmri_qctoolkit-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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