Metadata-Version: 2.4
Name: capcruncher-tools
Version: 0.2.5
Requires-Dist: loguru>=0.7.0,<0.8.0
Requires-Dist: pandas>=2.1.0,<3.0.0
Requires-Dist: polars>=1.6.0,<2.0.0
License-File: LICENSE
Summary: Extra utilities to enhance CapCruncher
Author: asmith
Author-email: alastair.smith@ndcls.ox.ac.uk
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: repository, https://github.com/alsmith151/CapCruncherTools

# CapCruncherTools

## Overview

A collection of Rust tools to speed up the Python-based functionality of the CapCruncher project. Python bindings have been generated to allow for easy integration into the existing Python code base.

## Development

This project uses [uv](https://docs.astral.sh/uv/) for Python dependency management and environment setup. Dependencies are declared in `pyproject.toml` and resolved in `uv.lock`.

Create or update the local environment:

```bash
uv sync --dev
```

Build the Rust extension into the uv environment:

```bash
uv run maturin develop --release
```

Run the test suite:

```bash
uv run pytest
```

Refresh locked dependencies after editing `pyproject.toml`:

```bash
uv lock --upgrade
```

Release version bumps are managed by release-plz. After conventional commits
land on the default branch, the release workflow opens or updates a release PR
that bumps `Cargo.toml`, updates `Cargo.lock`, and maintains the changelog.
Merge that PR, then create a `vX.Y.Z` GitHub release from the merged commit to
publish the Python distributions.

Runtime dependency ranges are intentionally broad so `capcruncher-tools` can
install inside CapCruncher pipeline environments without forcing shared
libraries such as Click, pandas, or Polars to a single version. Build and
development tools remain pinned for reproducible local builds. CapCruncher
itself is expected to be supplied by the parent pipeline or CLI environment.

## Current Accelerators

### FASTQ deduplication

This tool takes paired FASTQ files and removes any duplicate fragments. 

Use it through the CapCruncher CLI or Python API; this package provides the
compiled acceleration layer.


### Restriction digestion of FASTA

This tool takes a FASTA file and a list of restriction enzymes and produces a list of fragments in BED format.

Use it through the CapCruncher CLI or Python API; this package does not install a
separate `capcruncher-tools` command.


### Count restriction fragments

This tool counts the number of interactions between a fragment (in silico digested read).

Use it through CapCruncher's interaction-counting API; cooler creation and
workflow orchestration live in CapCruncher.

