Skip to content

JMB-Scripts/ConServation-to-PDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

CS-to-PDB

CS-to-PDB is a standalone Python application that calculates residue conservation from a Multiple Sequence Alignment (MSA) and maps evolutionary information onto three-dimensional protein structures by storing conservation scores in the PDB B-factor field. The resulting structures can be visualized directly in PyMOL and ChimeraX, while an interactive HTML alignment viewer provides a convenient way to compare sequence conservation with structural data.


Features

  • Multiple conservation metrics:
    • BLOSUM62 similarity
    • Shannon Entropy
    • Property Conservation
    • Jensen-Shannon Divergence (JSD)
    • Rate4Site-like weighted conservation
  • Optional gap penalty for poorly aligned regions.
  • Supports PDB and mmCIF structures.
  • Maps conservation scores directly into the B-factor field.
  • Generates visualization scripts for PyMOL and ChimeraX.
  • Generates an interactive HTML alignment viewer.
  • Supports all Matplotlib colormaps, including custom palettes (e.g. MolNympheas).
image
  • Uses identical color palettes for:
    • Protein structures
    • HTML alignment viewer
image
  • PyMOL
image
  • ChimeraX
image

(small bug with the ramp, I'm working on it)

  • Simple graphical user interface.
  • Cross-platform (Linux, macOS and Windows).

Output files

Project/
│
├── protein.pdb
├── conservation.txt
├── visualization.pml
├── visualization.cxc
└── alignment.html
File Description
.pdb Protein structure with conservation scores stored in the B-factor field
.txt Residue-by-residue conservation table
.pml PyMOL visualization script
.cxc ChimeraX visualization script
.html Interactive conservation-colored alignment viewer

Requirements

  • Python 3.9+
  • Biopython
  • NumPy
  • Matplotlib
  • Tkinter (included with most Python installations)

Install the required packages with:

pip install biopython numpy matplotlib

License

Do whatever you want with the scripts and keep in mind that it has been code by a stupid biochemist (for that matter me).

About

CS-to-PDB is an integrated toolkit for calculating sequence conservation, mapping it onto protein structures, and generating publication-ready structural and sequence visualizations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages