Skip to main content

A workflow for aligning ligands and calculating contacts.

Project description

Ligand Workflow

ligand_workflow 是一个用于处理和分析分子对接数据的工作流工具。它包括多个功能模块,能够帮助你对齐配体,计算分子间接触并将 JSON 格式的数据转换为 CSV 表格,便于进一步分析。

功能

  • ligand-align: 对齐多个结构中的配体到参考结构的配体(基于pymol的)。
  • ligand-contacts: 计算分子之间的极性接触并输出结果(基于pymol的)。
  • json-to-csv: 将包含多个 PDB 文件的 JSON 数据转换为 CSV 格式,便于后续分析和展示。

安装

你可以使用 pip 从 PyPI 安装该包,也可以从源代码安装。

通过 PyPI 安装

pip install ligand_workflow

用法

依托于config file进行工作流配置,config file的格式如下:

6GZR.1-10_09 #这是x-ray结构的文件名
resn FH8 and chain A and resi 101 #这是需要处理的配体的筛选条件
chain A and polymer # 这是需要处理的RNA/DNA/蛋白质的筛选条件

使用说明

1. 配体对齐

对齐多个结构文件的配体到参考结构的配体。运行以下命令:

ligand-align -i <input_folder> -c <config_file>
  • <input_folder>: 包含 PDB 文件的文件夹路径。-
  • <config_file>: 配置文件,指定参考结构和配体选择条件。

2. 计算接触

计算分子之间的极性接触并输出结果:

ligand-contacts -i <input_folder> -c <config_file> -o <output_file>
  • <input_folder>: 包含 PDB 文件的文件夹路径。
  • <config_file>: 配置文件,指定配体选择条件。
  • <output_file>: 输出的 JSON 文件路径。

3. JSON 转 CSV

将 JSON 文件转换为 CSV 格式的表格:

json-to-csv -j <input_json> -o <output_csv> -x <xray_identifier>
  • <input_json>: 输入的 JSON 文件路径。
  • <output_csv>: 输出的 CSV 文件路径。
  • <xray_identifier>: 用于识别 x‑ray 组的标识符。

示例

1. 配体对齐:

假设你有一个包含多个 PDB 文件的文件夹 pdbs/ 和一个配置文件 config.txt,你可以使用以下命令将所有文件与参考结构进行对齐:

ligand-align -i pdbs/ -c config.txt

2. 计算接触:

如果你有多个 PDB 文件,并想计算它们的接触并输出到一个 JSON 文件:

ligand-contacts -i pdbs/ -c config.txt -o contacts.json

3. JSON 转 CSV:

如果你有一个包含接触数据的 JSON 文件 contacts.json,并希望将其转换为 CSV 文件:

json-to-csv -j contacts.json -o contacts.csv -c config.txt

4. 统一调用

如果你想将所有步骤组合在一起,你可以使用以下命令:

ligand-workflow -i pdbs/ -c config.txt -o contacts.json -x xray

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ligand_workflow-0.0.6.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ligand_workflow-0.0.6-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file ligand_workflow-0.0.6.tar.gz.

File metadata

  • Download URL: ligand_workflow-0.0.6.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ligand_workflow-0.0.6.tar.gz
Algorithm Hash digest
SHA256 9b04d1c2c53c357345d2bd0f97ad0f6f13e6f7dd425ad9a04c7c10804a09b5e9
MD5 e1302b698851eee389a6c33ddd242496
BLAKE2b-256 c4d2a52fab18a8f2246bc7aa8db2f064e78eb617de3495604d682934543ae7ad

See more details on using hashes here.

File details

Details for the file ligand_workflow-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for ligand_workflow-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 66245249682977a8a5ca8b61b6ec6a7d090e267c0e04777f81e6c8688c871dae
MD5 bd053a1e881f454ff800e1f3a5a9fc01
BLAKE2b-256 3dd708d7d0fb32be4d0430baf287e13dd8ff0651b4f6e306dacb6234bd1b6be0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page