1. 目录结构调整: - 创建scripts目录统一存放分析脚本 - 保持数据文件在原有目录结构中 - 生成的CSV文件和PNG图表文件也放在scripts目录下 2. 功能改进: - 更新calculate_qed_values.py脚本,添加对参考分子SDF文件的处理 - 修改analyze_qed_mw_distribution.py脚本,统一使用SDF文件stem名称作为参考分子标识符 - 改进Vina得分提取逻辑,支持从SDF文件中提取所有构象的得分 - 完善KDE分布图绘制,确保参考分子在所有图表中显示统一的名称 3. 文档更新: - 更新README.md中的目录结构说明 - 更新命令行和API使用示例 - 添加详细的使用说明和示例 4. 示例代码: - 更新example_api_usage.py以适应新的目录结构和API调用方式
35 lines
1.3 KiB
Python
35 lines
1.3 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
Example usage of the analyze_qed_mw_distribution API
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
# Add the scripts directory to the path
|
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
from analyze_qed_mw_distribution import main_api
|
|
|
|
print("Running analysis examples...")
|
|
|
|
# Example 1: Basic usage
|
|
print("\nExample 1: Basic usage")
|
|
main_api(['qed_values_fgbar.csv', 'qed_values_trpe.csv'], ['fgbar', 'trpe'])
|
|
|
|
# Example 2: With custom reference scores
|
|
print("\nExample 2: With custom reference scores")
|
|
main_api(['qed_values_fgbar.csv', 'qed_values_trpe.csv'], ['fgbar', 'trpe'],
|
|
reference_scores={'fgbar': {'9NY': -5.268}, 'trpe': {'0GA': -6.531}})
|
|
|
|
# Example 3: With specific conformation rank
|
|
print("\nExample 3: With specific conformation rank")
|
|
main_api(['qed_values_fgbar.csv', 'qed_values_trpe.csv'], ['fgbar', 'trpe'], rank=0)
|
|
|
|
# Example 4: With both custom reference scores and specific conformation rank
|
|
print("\nExample 4: With both custom reference scores and specific conformation rank")
|
|
main_api(['qed_values_fgbar.csv', 'qed_values_trpe.csv'], ['fgbar', 'trpe'],
|
|
reference_scores={'fgbar': {'9NY': -5.268}, 'trpe': {'0GA': -6.531}}, rank=0)
|
|
|
|
print("\nAnalysis complete! Check the generated PNG files.") |