Metadata-Version: 2.4
Name: isoform-grammar
Version: 0.1.1
Summary: Alignment-derived splice isoform deletion topology and multimer interface state-transition profiling
Author-email: Taner Karagöl <karagolt@mit.edu>, Alper Karagöl <akaragol@mit.edu>
License-Expression: MIT
Project-URL: Homepage, https://www.karagolresearch.com/isoform-grammar
Project-URL: Repository, https://github.com/karagol-taner/truncation-structural-grammar
Project-URL: Preprint, https://doi.org/10.64898/2026.05.06.723091
Project-URL: bio.tools, https://bio.tools/isoform-grammar
Keywords: bioinformatics,alternative-splicing,protein-isoforms,homodimers,alphafold,protein-protein-interfaces
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Dynamic: license-file

# isoform-grammar

[![PyPI version](https://img.shields.io/pypi/v/isoform-grammar)](https://pypi.org/project/isoform-grammar/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

`isoform-grammar` classifies canonical-versus-isoform protein deletion topology via affine-gap BLOSUM62 global alignment (resolving splice-junction residue substitutions that defeat exact prefix/suffix checks) and profiles multimer interface conservation, destabilization, complete ablation, and emergence across `ipTM`, `ipSAE_min`, interface contact counts, and 3D PDB/mmCIF dimer coordinates.

## Installation

```bash
pip install isoform-grammar
```

## Command-Line Usage

### 1. Classify Deletion Windows and Topology for a Single Pair or Cohort CSV

```bash
isoform-grammar align --canon-seq MKTIIALSYIFCLVFADYKDDDDK --iso-seq MKTIIALSYIFCLVFA
isoform-grammar align --fasta sequences.fasta --pairs pairs.csv -o alignment_topology.csv
```

### 2. Profile Multimer Interface State Transitions (`ipTM` and `ipSAE_min`)

```bash
isoform-grammar profile --pairs pairs.csv --fasta sequences.fasta -o profiled_pairs.csv
```

### 3. Compare Canonical and Isoform 3D Dimer Structures Directly (`.pdb` or `.cif`)

```bash
isoform-grammar structure --canon canonical_dimer.cif --iso isoform_dimer.cif --cutoff 5.0
```

## Python API

```python
from isoform_grammar import (
    align_isoform_pair,
    classify_interface_transition,
    compare_dimer_structures,
    profile_pair_table,
)

topo = align_isoform_pair("MKTIIALSYIFCLVFADYKDDDDK", "MKTIIALSYIFCLVFA")
print(topo["topology_alignment"], topo["deletion_window"], topo["deletion_length"])

state = classify_interface_transition(canon_iptm=0.86, iso_iptm=0.28, canon_ipsae=0.81, iso_ipsae=0.14)
print(state["biological_outcome"], state["tier_transition"])
```

## Citation

Karagöl, T., Karagöl, A. Structural grammar of truncation across the human homodimer landscape. *bioRxiv* (2026). https://doi.org/10.64898/2026.05.06.723091

## License

Released under the MIT License.
