Metadata-Version: 2.4
Name: zipstrain
Version: 1.0.0
Summary: 
License-Expression: MIT
License-File: LICENSE
Author: ParsaGhadermazi
Author-email: 54489047+ParsaGhadermazi@users.noreply.github.com
Requires-Python: >=3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Provides-Extra: matrix
Provides-Extra: test
Requires-Dist: aiofiles (>=25.1.0,<26.0.0)
Requires-Dist: click (>=8.3.1,<9.0.0)
Requires-Dist: duckdb (>=1.1,<2.0.0)
Requires-Dist: h5py ; extra == "matrix"
Requires-Dist: matplotlib (>=3.10.7,<4.0.0)
Requires-Dist: numpy (>=2.3.4,<3.0.0)
Requires-Dist: pandas (>=2.3.3,<3.0.0)
Requires-Dist: plotly (>=6.3.1,<7.0.0)
Requires-Dist: polars (>=1.34.0)
Requires-Dist: psutil (>=7.1.2,<8.0.0)
Requires-Dist: pyarrow (>=22.0.0,<23.0.0)
Requires-Dist: pydantic (>=2.12.3,<3.0.0)
Requires-Dist: pytest (>=8.0.0,<9.0.0) ; extra == "test"
Requires-Dist: pytest-cov (>=5.0.0,<6.0.0) ; extra == "test"
Requires-Dist: rich (>=14.2.0,<15.0.0)
Requires-Dist: scipy (>=1.16.2,<2.0.0)
Requires-Dist: seaborn (>=0.13.2,<0.14.0)
Requires-Dist: torch ; extra == "matrix"
Description-Content-Type: text/markdown

# ZipStrain

Fast strain-level metagenomics in three commands: **`map`** reads to BAMs,
**`profile`** them into per-position nucleotide-count tables, and **`compare`**
samples by ANI to tell whether they share a strain.

Documentation:

- Docs: https://OlmLab.github.io/ZipStrain/
- Repository: https://github.com/OlmLab/ZipStrain

## Install

Conda is the easiest path — it brings in `samtools` and the `map` aligners too:

```bash
conda create -n zipstrain -c conda-forge -c bioconda \
  python=3.12 zipstrain bowtie2 samtools sylph
```

Or with pip (into a fresh virtual environment):

```bash
pip install zipstrain
```

Matrix-store comparison dependencies (`compare --method matrix`):

```bash
pip install "zipstrain[matrix]"
```

Notes:

- With pip, install `samtools` separately (profiling needs it); `zipstrain map`
  additionally needs `bowtie2` and `sylph` (and `prodigal` for `--predict-genes`).
- On Apple Silicon, use a native `osx-arm64` Conda so dependencies install
  natively; the standard `torch` wheel uses the MPS backend.
- Linux CUDA installs should replace Torch with the matching CUDA wheel from
  PyTorch:

  ```bash
  pip install "zipstrain[matrix]"
  pip install --upgrade torch --index-url https://download.pytorch.org/whl/cu124
  ```

See the [installation guide](https://OlmLab.github.io/ZipStrain/installation/)
for full details.

## Verify

```bash
zipstrain --version
zipstrain test
```

## Cite

If you use ZipStrain in your research, please cite the preprint:

Ghadermazi P, Emerson JB, Olm MR. 2026. *ZipStrain Enables Rapid and Precise
Strain-Resolved Metagenomics*. bioRxiv. DOI:
`10.64898/2026.05.20.726564`

GitHub citation metadata is provided in `CITATION.cff`:

- https://github.com/OlmLab/ZipStrain/blob/main/CITATION.cff

## License

ZipStrain is distributed under the MIT License.

