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.2

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.2
File Size Uploaded Provenance Actions
fmri_qctoolkit-2.0.2.tar.gz 123.3 kB With provenance Details for fmri_qctoolkit-2.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 195.0 kB

Release files / fmri_qctoolkit-2.0.2.tar.gz

Download URL fmri_qctoolkit-2.0.2.tar.gz
Size 123.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e0059337cc131a4e6cb6671685abeefb4685d31067f29525bdaa9008662678ec
BLAKE2b-256 checksum
How to use checksums
f3f79b3b660c5f49a95a815f77bfac3b9da8e55e09db5edbde1b56ae94d091e5
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 27, 2026.

Transparency log

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

Download URL fmri_qctoolkit-2.0.2-py3-none-any.whl
Size 71.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
019e3123fa315143f8ad827d4068961d5cc9231d2517d2be017d612cb2684ee8
BLAKE2b-256 checksum
How to use checksums
81d650ba8da9468066b51bca7a4afb4a038fe8c6e961cbc8bf9f4edcd6e53c84
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 27, 2026.

Transparency log

Security for fmri-qctoolkit 2.0.2

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.2.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 27, 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