拉马钱德兰绘图工具
项目描述
拉马钱德兰绘图工具
根据输入 PDB 文件(例如 1MBN.pdb)绘制拉马钱德兰图。利用高斯 KDE(核密度估计)来绘制有利扭转角(φ 和 ψ)的密度。
安装
RamachanDraw 托管在PyPi上。
pip install RamachanDraw
用法
Ramachandran 包含有用的函数,可轻松绘制 Ramachandran 图。
从在线存储库中获取 PDB 文件
要绘制 Ramachandran 图,我们需要一个 PDB 文件。您可以通过指定路径来使用本地 PDB 文件。或者,RamachanDraw 方便地包含一个功能,用于自动获取和本地存储给定 PDB id 的 PDB 文件。
论据
fetch(pdb_file)
pdb_file (str)
:要下载的 PDB 条目对应的 PDB id。Returns
: PDB 文件的路径。
提取 φ 和 ψ 角
RamachanDraw 利用Biopython模块从 PDB 文件中提取 φ 和 ψ 角。return_ignored
此外,可以使用参数提取图中未绘制的氨基酸残基。
论据
phi_psi(pdb_file, return_ignored)
pdb_file (str)
:要下载的 PDB 条目对应的 PDB id。return_ignored (bool)
:True
返回格式为 (氨基酸, (phi, psi)) 的元组列表
Returns
:字典中的键为氨基酸残基,值为 (phi, psi) 角度值。
拉马钱德兰情节
利用matplotlib模块绘制高度可定制的 Ramachandran 图。
论据
plot(pdb_file, cmap='viridis', alpha=0.75, dpi=100, save=True, show=False, out='plot.png')
pdb_file (str)
:要下载的 PDB 条目对应的 PDB id。cmap (str)
: 用于(来自 matplotlib)偏好(“允许”)区域的密度的颜色图;默认为viridis。alpha (float)
:设置颜色图的不透明度(值在 0-1 之间);默认值为 0.75。dpi (int)
:分辨率(每英寸点数);默认值为 100。save (bool)
:True
:在本地保存绘图;默认为真。
show (bool)
:True
:显示使用 Qt5Agg 后端的绘图;默认为假。
out (str)
: 保存绘图时使用的文件名(即save=True
);默认为plot.png。Returns
:Ramachandran 图(可以保存在本地)。
例子
在这里,您将在蛋白质数据库中与肌红蛋白条目 - 1MBN -对应的 PDB id 中找到一个示例。
from RamachanDraw import fetch, phi_psi, plot
# PDB id to be downloaded
PDB_id = '1MBN'
# Drawing the Ramachandran plot
plot(fetch(PDB_id))
# Generating a dictionary to store the phi and psi angles
# And returning the ignored aminoacid residues
phi_psi_dict, ignored_res = phi_psi(fetch(PDB_id), return_ignored=True)
贡献
欢迎提供反馈和建设性批评:a.dias.cirilo@umail.leidenuiv.nl。
执照
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
RamachanDraw-0.2.3.tar.gz
(83.2 kB
查看哈希)
内置分布
RamachanDraw-0.2.3-py3-none-any.whl
(82.6 kB
查看哈希)
关
RamachanDraw-0.2.3- py3 -none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | c9335c26c44ee5a0b9a5e998f9513799dd6f2acf66b2c0c6ba4f952c483270d8 |
|
MD5 | ba202097e8c9ef6ed32956381f126e66 |
|
布莱克2-256 | 4f8027dfbf1451a7b69b21143caa099560e1bb61044f4dd026640e02a95ca86b |