semvec/pypi-packages huggingface dataset:
CenStats 0.1.3
Centromere statistics toolkit.
License: MIT License
Requires Python: >=3.12

# `CenStats`
[![CI](https://github.com/logsdon-lab/centromere-status-checker/actions/workflows/main.yml/badge.svg)](https://github.com/logsdon-lab/centromere-status-checker/actions/workflows/main.yml)
[![PyPI - Version](https://img.shields.io/pypi/v/CenStats)](https://pypi.org/project/CenStats/)

Centromere statistics toolkit.

* `length`
    * Estimate HOR array length from [`stv`](https://github.com/fedorrik/stv) bed file and [`HumAS-HMMER`](https://github.com/fedorrik/HumAS-HMMER_for_AnVIL) output.
* `nonredundant`
    * Get a non-redundant list of centromeres based on HOR array length from two AS-HOR array length lists. Uses output from `length` command.
* `entropy`
    * Calculate Shannon index across a region from [`RepeatMasker`](https://www.repeatmasker.org/) repeats.
* `self-ident`
    * Calculate 1D or 2D self-sequence average nucleotide identity via a k-mer-based containment index. Built from [`ModDotPlot`](https://github.com/marbl/ModDotPlot)'s source code.
* `kmer-entropy`
    * Calculate Shannon index from a fasta file across all windows and their kmer set. 

### Setup
```bash
pip install censtats
```

### Usage
```bash
usage: censtats [-h] {length,nonredundant,entropy,self-ident,kmer-entropy} ...

Centromere statistics toolkit.

positional arguments:
  {length,nonredundant,entropy,self-ident,kmer-entropy}

options:
  -h, --help            show this help message and exit
```

Read the docs [here](https://github.com/logsdon-lab/CenStats/wiki/Usage).

### Build
```bash
make venv && make build && make install
source venv/bin/activate && censtats -h
```

To run tests:
```bash
source venv/bin/activate && pip install pytest
pytest -s -vv
```