Metadata-Version: 2.4
Name: pyplogo
Version: 0.1.6
Summary: A professional tool for protein secondary structure analysis and visualization. Offers a complete solution from structure extraction, multi-theme customization to high-quality publication-ready plotting.
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: biopython>=1.80
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: numpy>=1.24.0

\# pyplogo-toolkit

PyPLogo工具包：专业的蛋白质二级结构分析可视化工具。提供从结构提取、多主题定制到高质量出版级绘图的完整解决方案。



PyPLogo Toolkit: A professional tool for protein secondary structure analysis and visualization. Offers a complete solution from structure extraction, multi-theme customization to high-quality publication-ready plotting.

<img width="1190" height="790" alt="output-1" src="https://github.com/user-attachments/assets/32ea6516-c587-44ea-9a30-b1a5a79923e1" />

<img width="2987" height="1335" alt="output-2" src="https://github.com/user-attachments/assets/bd4a6dc9-a04a-4a95-8114-5c8adfb8266b" />

<img width="1190" height="790" alt="output" src="https://github.com/user-attachments/assets/4b34c491-f050-4336-9c99-5d2c9da98381" />

## Multiple-sequence alignment with secondary structure

Version 0.1.6 adds compact multi-line alignments with a selectable structure
sequence, DSSP structure glyphs, disulfide markers, and residue-level
annotation tracks.

```python
from pyplogo import SecondaryStructureVisualizer

alignment = {
    "reference": "MK--TAACDEFG",
    "homolog":   "MKQ-TAACDEFG",
}

visualizer = SecondaryStructureVisualizer(
    colors={
        "H": "#59B97B",
        "G": "#D38AAA",
        "I": "#7668B5",
        "E": "#D6A15E",
        "T": "#9D8BC5",
        "structure_label": "#B27A3D",
    }
)

fig = visualizer.create_alignment_figure(
    alignment,
    structure_sequence="reference",
    secondary_structure="HHTTEEECCC",
    structure_label="reference structure",
    amino_acids_per_line=60,
    structure_mode="major",  # H/G/I/E/T; use "all" for S and coil too
    sequence_colors={"reference": "#B27A3D", "homolog": "#7668B5"},
    disulfide_bonds=[(7, 10)],  # 1-based ungapped residue positions
    epitope_annotations={
        "antibody A epitope": [7, 9, 10],
        "antibody B epitope": [8, 11],
    },
    epitope_colors={
        "antibody A epitope": "#8FB9DB",
        "antibody B epitope": "#D39A9B",
    },
)
fig.savefig("alignment.svg", bbox_inches="tight")
```

Frequently used style controls include:

- `show_legend`, `legend_position`, `legend_columns`, `legend_font_size`
- `show_epitope_legend`, `epitope_marker`, `epitope_marker_size`
- `sequence_font_size`, `label_font_size`, `sequence_pitch`
- `show_residue_numbers`, `show_conservation`, `conservation_threshold`
- `disulfide_color`, `disulfide_text_color`, `disulfide_line_width`
- `annotation_offset`, `annotation_track_spacing`, `structure_offset`



