Metadata-Version: 2.4
Name: poseigen_chisel
Version: 1.0.1
Summary: The basics for Poseigen software
Author-email: Husam Abdulnabi <husam.abdulnabi@gmail.com>
Maintainer-email: Husam Abdulnabi <husam.abdulnabi@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/husam94/poseigen_chisel
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: biopython
Requires-Dist: pyBigWig
Requires-Dist: pysam
Requires-Dist: poseigen_seaside
Dynamic: license-file

# Chisel

[![PyPI version](https://img.shields.io/pypi/v/poseigen_chisel)](https://pypi.org/project/poseigen_chisel/)
[![Python versions](https://img.shields.io/pypi/pyversions/poseigen_chisel)](https://pypi.org/project/poseigen_chisel/)
[![License](https://img.shields.io/pypi/l/poseigen_chisel)](https://pypi.org/project/poseigen_chisel/)

`poseigen_chisel` is the biological-data processing package in the [Poseigen ecosystem](https://github.com/Husam94/poseigen). It prepares genomic sequences, interval annotations, and signal tracks for machine-learning workflows.

Chisel keeps genomic structure explicit instead of flattening everything immediately, so sequences, signals, and annotations remain easy to inspect and trace.

## Installation

Requires Python 3.12 or newer. Install from PyPI:

```bash
python -m pip install poseigen_chisel
```

## Package

Chisel's public helpers are re-exported from the `poseigen_chisel` package:

- **Currents** are Python lists of NumPy arrays, typically one array per chromosome or contig. A matching sequence-ID list (`BS_ids`) identifies each array; signal arrays use positions as rows and signal channels as columns. `Currents2Current` combines multiple currents while preserving that per-contig organization.
- **Markers** are pandas DataFrames with one row per genomic feature. Common columns include `subseq`, `loc`, `strand`, and `size`, with optional extra annotations.
- **Packs** are fixed-size windows extracted around markers from a Current or sequence data. Signal profile packs typically have shape `(markers, positions, channels)`; sequence packs remain lists of sequences unless an encoding function such as `Seqs2OHE` is requested.

The package also provides helpers for working with these formats:

- **Sequence processing** includes `Seq2Int`, `Seqs2SigCurrent`, `Seqs2OHE`, and `SeqCurrent2Pack` for encoding sequences and extracting sequence packs.
- **Markers and signal packs** includes `Bed2Markers` for creating coordinate-labelled marker tables, plus `SigCurrent2Pack` for extracting signal profiles around markers.
- **Signal conversion** includes `Bw2Current` and `Bam2Current` for converting BigWig tracks and BAM alignments into per-chromosome arrays.
- **Motif analysis** includes `MEME2Motifs`, `PPM2PWM`, and `OHE_PWM_Scan` for importing motifs, preparing position-weight matrices, and scanning one-hot encoded sequences.

## Case studies

- **Protein-DNA interactions**
  - [CTCF case study](https://github.com/Husam94/CS-CTCF)
  - [YY1 case study](https://github.com/Husam94/CS-YY1)
- **Enhancer activity**
  - [Enhancer activity case study](https://github.com/Husam94/CS-EnhAct)
