Metadata-Version: 2.4
Name: CPACqc
Version: 0.2.11
Summary: A package to view Nifti files in a BIDS dataset and generate QC plots.
Home-page: https://github.com/birajstha/bids_qc
Author: Biraj Shrestha
Author-email: birajstha@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: backports.tarfile==1.2.0
Requires-Dist: bidsschematools==1.0.3
Requires-Dist: certifi==2025.1.31
Requires-Dist: cffi==1.17.1
Requires-Dist: charset-normalizer==3.4.1
Requires-Dist: colorama==0.4.6
Requires-Dist: contourpy==1.3.1
Requires-Dist: cryptography==44.0.1
Requires-Dist: cycler==0.12.1
Requires-Dist: docutils==0.21.2
Requires-Dist: elbow==0.1.1
Requires-Dist: fonttools==4.56.0
Requires-Dist: id==1.5.0
Requires-Dist: idna==3.10
Requires-Dist: importlib_metadata==8.6.1
Requires-Dist: importlib_resources==6.5.2
Requires-Dist: jaraco.classes==3.4.0
Requires-Dist: jaraco.context==6.0.1
Requires-Dist: jaraco.functools==4.1.0
Requires-Dist: jeepney==0.9.0
Requires-Dist: joblib==1.4.2
Requires-Dist: keyring==25.6.0
Requires-Dist: kiwisolver==1.4.8
Requires-Dist: lxml==5.3.1
Requires-Dist: markdown-it-py==3.0.0
Requires-Dist: matplotlib==3.10.0
Requires-Dist: mdurl==0.1.2
Requires-Dist: more-itertools==10.6.0
Requires-Dist: nh3==0.2.21
Requires-Dist: nibabel==5.3.2
Requires-Dist: nilearn==0.11.1
Requires-Dist: numpy==2.2.3
Requires-Dist: packaging==24.2
Requires-Dist: pandas==2.2.3
Requires-Dist: pillow==11.1.0
Requires-Dist: pyarrow==19.0.0
Requires-Dist: pycparser==2.22
Requires-Dist: Pygments==2.19.1
Requires-Dist: pyparsing==3.2.1
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: pytz==2025.1
Requires-Dist: readme_renderer==44.0
Requires-Dist: reportlab==4.3.1
Requires-Dist: requests==2.32.3
Requires-Dist: requests-toolbelt==1.0.0
Requires-Dist: rfc3986==2.0.0
Requires-Dist: rich==13.9.4
Requires-Dist: scikit-learn==1.6.1
Requires-Dist: scipy==1.15.2
Requires-Dist: SecretStorage==3.3.3
Requires-Dist: six==1.17.0
Requires-Dist: threadpoolctl==3.5.0
Requires-Dist: tqdm==4.67.1
Requires-Dist: twine==6.1.0
Requires-Dist: typing_extensions==4.12.2
Requires-Dist: tzdata==2025.1
Requires-Dist: urllib3==2.3.0
Requires-Dist: zipp==3.21.0
Requires-Dist: setuptools==75.8.2
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

[![PyPI Downloads](https://static.pepy.tech/badge/cpacqc)](https://pepy.tech/projects/cpacqc)

# CPAC-QC Plotting App

### PDF Report
![PDF report](https://raw.githubusercontent.com/birajstha/bids_qc/main/static/cpac-qc_pdf.png)
example PDF report here: [PDF REPORT](https://github.com/birajstha/bids_qc/raw/main/static/sub-PA001_ses-V1W1_qc_report.pdf)

### HTML Report
![CPAC-QC](https://raw.githubusercontent.com/birajstha/bids_qc/main/static/cpac-qc.png)

## Overview

The CPAC-qc Plotting App is a tool designed to generate quality control plots for the CPAC (Configurable Pipeline for the Analysis of Connectomes) outputs. This app helps in visualizing and assessing the quality of neuroimaging data processed through CPAC.

## Updates
- Outputs PDF (default) and HTML report (with -html flag) now.
- [Default config](https://github.com/birajstha/bids_qc/raw/main/CPACqc/overlay/overlay.csv) has overlays.
- Images on PDF report will follow the order mentioned in overlay.csv provided or default.
- Added Bookmarks on PDF report for easy navigation.

## Features
- Generate bulk or subject specific plots and reports.

## Requirements

- BIDS dir with `.nii.gz` images in it.
- (Optional) A html viewing tool or extension
- PDF viewer

## Installation

```bash
pip install CPACqc
```

## Usage


1. **Minimal code**

```bash
cpacqc -d bids_dir
```

This will output a pdf report `report.pdf` in your current directory.


2. **HTML report**

```bash
cpacqc -d bids_dir -html
```

This will create a pdf `report.pdf` along with a `results` dir with HTML report `index.html` and related files.


3. **Running single/multiple Subjects**

```bash
cpacqc -d bids_dir -s subject-id_1 subject-id_2
```

You can hand pick a single or a multiple subjects with `-s` flag


4. **Running with defined number of procs**

```bash
cpacqc -d path/to/bids_dir  -n number-of-procs
```

Note: if -n is not provided default is 8


5. **Running all Subjects in the dir**

```bash
cpacqc -d /bids_dir 
```


6. **Providing Overlays config**

```bash
cpacqc -d path/to/bids_dir -c ./overlay.csv
```

where overlay.csv can be in format

```csv
output,underlay,datatype
desc-preproc_bold,desc-preproc_T1w,func
```

and so on.
If not provided a [default config](https://github.com/birajstha/bids_qc/raw/main/CPACqc/overlay/overlay.csv) will be used.

## Viewing

Use any PDF viewer to view `*report.pdf` file.

If `-html` enabled, Use any `.html` viewer extension to view `index.html` in the `results` dir.
