Skip to main content

A BIDS app for performing minimal QC beyond validation

Project description

miniQC

PyPI - Version PyPI - Python Version GHCR - Available Tags


miniQC is a BIDS App for performing minimal quality control beyond validation. Its goal is to rapidly detect data corruption, as opposed to dataset coherence or image quality.

Table of Contents

Installation

pip install miniqc

Usage

miniqc is a BIDS-App, so can be run as follows:

miniqc /path/to/dataset /output participant

Because miniqc does not currently generate any outputs or modify its behavior based on analysis level, output directory and analysis level are optional.

This tool is meant as a CLI application and does not provide a public API.

Example

$ miniqc tests/data/bids_dataset
[
  [
    "sub-01/anat/sub-01_acq-truncated_T2w.nii.gz",
    "FailedCheck",
    "Expected 477 bytes; found 352"
  ],
  [
    "sub-01/anat/sub-01_acq-dangling_T2w.nii.gz",
    "FileNotFoundError",
    "[Errno 2] No such file or directory: 'tests/data/bids_dataset/sub-01/anat/sub-01_acq-dangling_T2w.nii.gz'"
  ]
]

Single file usage is also permitted:

$ miniqc tests/data/bids_dataset/sub-01/anat/sub-01_acq-truncated_T2w.nii.gz
[
  [
    "/git/miniqc/tests/data/bids_dataset/sub-01/anat/sub-01_acq-truncated_T2w.nii.gz",
    "FailedCheck",
    "Expected 477 bytes; found 352"
  ]
]

Outputs

The output of this tool is a JSON array of arrays, each of length 3. Each sub-array contains the failed file (relative to dataset root), the type of error, and a message with more detail.

Testing

With the hatch project management tool installed:

hatch run test:cov

Alternately, just run pytest, although you will need the dependencies installed.

License

miniqc is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miniqc-23.1.0.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

miniqc-23.1.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page