Metadata-Version: 2.4
Name: qcatch
Version: 0.2.0
Summary: QCatch: Quality Control downstream of alevin-fry / simpleaf. 
Project-URL: Homepage, https://github.com/COMBINE-lab/QCatch
Project-URL: Source, https://github.com/COMBINE-lab/QCatch
Author-email: Yuan Gao <ygao61@umd.edu>, Dongze He <dhe17@umd.edu>, Rob Patro <rob@cs.umd.edu>
License: BSD 3-Clause License
        
        Copyright (c) 2025, COMBINE lab
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
        
        Additional License Information
        ------------------------------
        This repository is primarily licensed under the BSD 3-Clause License.
        However, the module located at `find_retained_cells/` is licensed under the
        GNU Affero General Public License, version 2 (AGPLv2). The full text
        of the AGPLv2 license is included at `find_retained_cells/README.md`.
        
        If you modify or redistribute code from `find_retained_cells/`, you must comply
        with the terms of the AGPLv2.
License-File: LICENSE
Requires-Python: ==3.12.9
Requires-Dist: beautifulsoup4==4.13.3
Requires-Dist: numpy==2.1.3
Requires-Dist: pandas==2.2.3
Requires-Dist: plotly==6.0.0
Requires-Dist: pyroe==0.9.0
Requires-Dist: scanpy==1.10.4
Requires-Dist: scipy==1.15.2
Description-Content-Type: text/markdown

# QCatch
Quality Control downstream of alevin-fry / simpleaf.

**QCatch** is a Python package designed to streamline quality control for single-cell sequencing data quantified by [alevin-fry](https://github.com/COMBINE-lab/alevin-fry) or [simpleaf](https://github.com/COMBINE-lab/simpleaf). It provides a comprehensive web-based quality control report, enabling researchers to:

- Summarize key **quality metrics** for single-cell sequencing datasets.
- Perform **cell calling** to identify high-quality cells.
- Generate interactive **visualizations** to support downstream analysis and interpretation.

QCatch is built to simplify the quality control process, making it easier for researchers to assess data quality and make informed decisions for further analysis.

## Installation

### Bioconda
You can install using [Conda](http://anaconda.org/)
from [Bioconda](https://bioconda.github.io/).

```bash
conda install -c bioconda qcatch 
```

### PyPI

You can also install from [PyPI](https://pypi.org/project/qcatch/) using `pip`:

```bash
pip install qcatch
```

## Basic Usage
Provide the path to the folder containing quantification results (or directly to a .h5ad file) generated by `alevin-fry` or `simpleaf`. QCatch will automatically scan the folder or load the specified file, assess data quality, and generate an interactive HTML report that can be viewed directly in your browser.

```bash
qcatch \
    --input path/to/your/quants/result/folder \
    --output path/to/desired/QC/output/folder \
    --chemistry 10X_3p_v3 
```
We highly recommend specifying the chemistry used in your experiment. By default, QCatch will assume the settings for 10X 3' v2 and v3 chemistry.

## Command-Line Arguments

| Flag | Short | Type | Description |
|------|-------|------|-------------|
| `--input`  | `-i` | `str` (Required) | Path to the input directory containing the quantification output files or to the HDF5 file itself. |
| `--output` | `-o` | `str`(Required)  | Path to the output directory.|
| `--chemistry` | `-c` | `str`(Optional but recommend) | Specifies the chemistry used in the experiment, determining the range for the `empty_drops` step. **Options**: `'10X_3p_v2'`, `'10X_3p_v3'`, `'10X_3p_v4'`, `'10X_3p_LT'`,`'10X_5p_v3'`,`'10X_HT'`. **Default**: Will use the range for `'10X_3p_v2'` and `'10X_3p_v3'`. |
| `--n_partitions` | `-n` | `int` (Optional) | Number of partitions (max number of barcodes to consider for ambient estimation). Skip this step if you already specified `--chemistry`. Only use `--n_partitions` when your experiment uses a custom chemistry not listed in the predefined chemistry options.|
| `--gene_id2name_file` | `-g` | `str` (Optional) | File provides a mapping from gene IDs to gene names. The file must be a CSV file contains two columns with headers: 'gene_id' (e.g., ENSG00000284733) and 'gene_name' (e.g., OR4F29). If not provided, an attempt will be made to look up the mapping in a remote registry. If that lookup fails the mitochondria plots will not be displayed.|
| `--save_filtered_h5ad` | `-s` | `flag` (Optional) |If enabled, `qcatch` will save a separate `.h5ad` file containing only the retained cells.|
| `--overwrite_h5ad` | `-o` | `flag` (Optional) |If enabled, `qcatch` will overwrite the original `.h5ad` file in place by appending cell filtering results to `anndata.obs`. No existing data or cells will be removed; only additional metadata columns are added.|
| `--verbose` | `-v` | `flag` (Optional) | Enable verbose logging with debug-level messages. |

