关于 brenda-database
brenda-database 是通过 BRENDA 官方 SOAP API 查询酶数据的 Skill,面向生化研究人员和酶工程人员,提供动力学、反应、物种及条件数据,并附带分析和可视化脚本。
主要功能
- 01查询 Km、kcat 和 Vmax 数值
- 02检索反应与酶底物
- 03比较不同物种的酶数据
- 04查看 pH、温度和辅因子
- 05分析抑制剂与激活剂
- 06构建通路并生成动力学图表
适用场景
- 01比较不同物种间的酶动力学
- 02查找作用于指定底物或产物的酶
- 03筛选酶工程候选变体
- 04为通路或动力学模型准备数据
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ davila7/ claude-code-templates --skill brenda-database安装后在 Claude Code 中输入/brenda-database确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/api_reference.mdscripts/brenda_queries.pybrenda_visualization.pyenzyme_pathway_builder.py详细介绍
BRENDA 数据库
概述
BRENDA(BRaunschweig ENzyme DAtabase)是全球最全面的酶信息系统,包含来自科学文献的详细酶数据。通过官方 SOAP API 查询酶的动力学参数(Km、kcat)、反应方程式、底物特异性、物种信息和最适条件。访问超过 45,000 种酶及数百万个动力学数据点,用于生化研究、代谢工程和酶发现。
何时使用此技能
在以下情况下应使用此技能:
- 搜索酶动力学参数(Km、kcat、Vmax)
- 获取反应方程式和化学计量信息
- 查找针对特定底物或反应的酶
- 比较不同物种中的酶特性
- 研究最适 pH、温度和条件
- 获取酶抑制和激活数据
- 支持代谢通路重建和逆合成
- 开展酶工程和优化研究
- 分析底物特异性和辅因子需求
核心功能
1. 动力学参数检索
获取全面的酶动力学数据:
按 EC 编号获取 Km 值:
from brenda_client import get_km_values
# Get Km values for all organisms
km_data = get_km_values("1.1.1.1") # Alcohol dehydrogenase
# Get Km values for specific organism
km_data = get_km_values("1.1.1.1", organism="Saccharomyces cerevisiae")
# Get Km values for specific substrate
km_data = get_km_values("1.1.1.1", substrate="ethanol")
解析 Km 结果:
for entry in km_data:
print(f"Km: {entry}")
# Example output: "organism*Homo sapiens#substrate*ethanol#kmValue*1.2#commentary*"
提取特定信息:
from scripts.brenda_queries import parse_km_entry, extract_organism_data
for entry in km_data:
parsed = parse_km_entry(entry)
organism = extract_organism_data(entry)
print(f"Organism: {parsed['organism']}")
print(f"Substrate: {parsed['substrate']}")
print(f"Km value: {parsed['km_value']}")
print(f"pH: {parsed.get('ph', 'N/A')}")
print(f"Temperature: {parsed.get('temperature', 'N/A')}")
2. 反应信息
获取反应方程式和详细信息:
按 EC 编号获取反应:
from brenda_client import get_reactions
# Get all reactions for EC number
reactions = get_reactions("1.1.1.1")
# Filter by organism
reactions = get_reactions("1.1.1.1", organism="Escherichia coli")
# Search specific reaction
reactions = get_reactions("1.1.1.1", reaction="ethanol + NAD+")
处理反应数据:
from scripts.brenda_queries import parse_reaction_entry, extract_substrate_products
for reaction in reactions:
parsed = parse_reaction_entry(reaction)
substrates, products = extract_substrate_products(reaction)
print(f"Reaction: {parsed['reaction']}")
print(f"Organism: {parsed['organism']}")
print(f"Substrates: {substrates}")
print(f"Products: {products}")
3. 酶发现
查找可催化特定生化转化的酶:
按底物查找酶:
from scripts.brenda_queries import search_enzymes_by_substrate
# Find enzymes that act on glucose
enzymes = search_enzymes_by_substrate("glucose", limit=20)
for enzyme in enzymes:
print(f"EC: {enzyme['ec_number']}")
print(f"Name: {enzyme['enzyme_name']}")
print(f"Reaction: {enzyme['reaction']}")
按产物查找酶:
from scripts.brenda_queries import search_enzymes_by_product
# Find enzymes that produce lactate
enzymes = search_enzymes_by_product("lactate", limit=10)
按反应模式搜索:
from scripts.brenda_queries import search_by_pattern
# Find oxidation reactions
enzymes = search_by_pattern("oxidation", limit=15)
4. 特定物种的酶数据
比较不同物种中的酶特性:
获取多个物种的酶数据:
from scripts.brenda_queries import compare_across_organisms
organisms = ["Escherichia coli", "Saccharomyces cerevisiae", "Homo sapiens"]
comparison = compare_across_organisms("1.1.1.1", organisms)
for org_data in comparison:
print(f"Organism: {org_data['organism']}")
print(f"Avg Km: {org_data['average_km']}")
print(f"Optimal pH: {org_data['optimal_ph']}")
print(f"Temperature range: {org_data['temperature_range']}")
查找含有特定酶的物种:
from scripts.brenda_queries import get_organisms_for_enzyme
organisms = get_organisms_for_enzyme("6.3.5.5") # Glutamine synthetase
print(f"Found {len(organisms)} organisms with this enzyme")
5. 环境参数
获取最适条件和环境参数:
获取 pH 和温度数据:
from scripts.brenda_queries import get_environmental_parameters
params = get_environmental_parameters("1.1.1.1")
print(f"Optimal pH range: {params['ph_range']}")
print(f"Optimal temperature: {params['optimal_temperature']}")
print(f"Stability pH: {params['stability_ph']}")
print(f"Temperature stability: {params['temperature_stability']}")
辅因子需求:
from scripts.brenda_queries import get_cofactor_requirements
cofactors = get_cofactor_requirements("1.1.1.1")
for cofactor in cofactors:
print(f"Cofactor: {cofactor['name']}")
print(f"Type: {cofactor['type']}")
print(f"Concentration: {cofactor['concentration']}")
6. 底物特异性
分析酶的底物偏好:
获取底物特异性数据:
from scripts.brenda_queries import get_substrate_specificity
specificity = get_substrate_specificity("1.1.1.1")
for substrate in specificity:
print(f"Substrate: {substrate['name']}")
print(f"Km: {substrate['km']}")
print(f"Vmax: {substrate['vmax']}")
print(f"kcat: {substrate['kcat']}")
print(f"Specificity constant: {substrate['kcat_km_ratio']}")
比较底物偏好:
from scripts.brenda_queries import compare_substrate_affinity
comparison = compare_substrate_affinity("1.1.1.1")
sorted_by_km = sorted(comparison, key=lambda x: x['km'])
for substrate in sorted_by_km[:5]: # Top 5 lowest Km
print(f"{substrate['name']}: Km = {substrate['km']}")
7. 抑制和激活
获取酶调控数据:
获取抑制剂信息:
from scripts.brenda_queries import get_inhibitors
inhibitors = get_inhibitors("1.1.1.1")
for inhibitor in inhibitors:
print(f"Inhibitor: {inhibitor['name']}")
print(f"Type: {inhibitor['type']}")
print(f"Ki: {inhibitor['ki']}")
print(f"IC50: {inhibitor['ic50']}")
获取激活剂信息:
from scripts.brenda_queries import get_activators
activators = get_activators("1.1.1.1")
for activator in activators:
print(f"Activator: {activator['name']}")
print(f"Effect: {activator['effect']}")
print(f"Mechanism: {activator['mechanism']}")
8. 酶工程支持
查找工程改造目标和替代方案:
查找嗜热同源酶:
from scripts.brenda_queries import find_thermophilic_homologs
thermophilic = find_thermophilic_homologs("1.1.1.1", min_temp=50)
for enzyme in thermophilic:
print(f"Organism: {enzyme['organism']}")
print(f"Optimal temp: {enzyme['optimal_temperature']}")
print(f"Km: {enzyme['km']}")
查找耐碱/耐酸变体:
from scripts.brenda_queries import find_ph_stable_variants
alkaline = find_ph_stable_variants("1.1.1.1", min_ph=8.0)
acidic = find_ph_stable_variants("1.1.1.1", max_ph=6.0)
9. 动力学建模
准备动力学建模所需的数据:
获取建模所需的动力学参数:
from scripts.brenda_queries import get_modeling_parameters
model_data = get_modeling_parameters("1.1.1.1", substrate="ethanol")
print(f"Km: {model_data['km']}")
print(f"Vmax: {model_data['vmax']}")
print(f"kcat: {model_data['kcat']}")
print(f"Enzyme concentration: {model_data['enzyme_conc']}")
print(f"Temperature: {model_data['temperature']}")
print(f"pH: {model_data['ph']}")
生成 Michaelis-Menten 曲线图:
from scripts.brenda_visualization import plot_michaelis_menten
# Generate kinetic plots
plot_michaelis_menten("1.1.1.1", substrate="ethanol")
安装要求
uv pip install zeep requests pandas matplotlib seaborn
身份验证设置
BRENDA 需要身份验证凭据:
- 创建 .env 文件:
[email protected]
BRENDA_PASSWORD=your_brenda_password
- 或设置环境变量:
export BRENDA_EMAIL="[email protected]"
export BRENDA_PASSWORD="your_brenda_password"
- 注册以访问 BRENDA:
- 访问 https://www.brenda-enzymes.org/
- 创建账户
- 查看电子邮件以获取凭据
- 注意:旧版支持也可使用
BRENDA_EMIAL(注意此处拼写有误)
辅助脚本
此技能包含用于查询 BRENDA 数据库的全面 Python 脚本:
scripts/brenda_queries.py
提供用于酶数据分析的高级函数:
主要函数:
parse_km_entry(entry):解析 BRENDA Km 数据条目parse_reaction_entry(entry):解析反应数据条目extract_organism_data(entry):提取特定生物体的信息search_enzymes_by_substrate(substrate, limit):查找可作用于底物的酶search_enzymes_by_product(product, limit):查找能生成产物的酶compare_across_organisms(ec_number, organisms):比较酶的性质get_environmental_parameters(ec_number):获取 pH 和温度数据get_cofactor_requirements(ec_number):获取辅因子信息get_substrate_specificity(ec_number):分析底物偏好get_inhibitors(ec_number):获取酶抑制数据get_activators(ec_number):获取酶激活数据find_thermophilic_homologs(ec_number, min_temp):查找耐热变体get_modeling_parameters(ec_number, substrate):获取动力学建模参数export_kinetic_data(ec_number, format, filename):将数据导出到文件
用法:
from scripts.brenda_queries import search_enzymes_by_substrate, compare_across_organisms
# Search for enzymes
enzymes = search_enzymes_by_substrate("glucose", limit=20)
# Compare across organisms
comparison = compare_across_organisms("1.1.1.1", ["E. coli", "S. cerevisiae"])
scripts/brenda_visualization.py
提供酶数据可视化函数:
主要函数:
plot_kinetic_parameters(ec_number):绘制 Km 和 kcat 分布图plot_organism_comparison(ec_number, organisms):比较不同生物体plot_pH_profiles(ec_number):绘制 pH 活性曲线plot_temperature_profiles(ec_number):绘制温度活性曲线plot_substrate_specificity(ec_number):可视化底物偏好plot_michaelis_menten(ec_number, substrate):生成动力学曲线create_heatmap_data(enzymes, parameters):创建热图数据generate_summary_plots(ec_number):创建全面的酶概览图
用法:
from scripts.brenda_visualization import plot_kinetic_parameters, plot_michaelis_menten
# Plot kinetic parameters
plot_kinetic_parameters("1.1.1.1")
# Generate Michaelis-Menten curve
plot_michaelis_menten("1.1.1.1", substrate="ethanol")
scripts/enzyme_pathway_builder.py
构建酶促途径和逆合成路线:
主要函数:
find_pathway_for_product(product, max_steps):查找酶促途径build_retrosynthetic_tree(target, depth):构建逆合成树suggest_enzyme_substitutions(ec_number, criteria):推荐替代酶calculate_pathway_feasibility(pathway):评估途径可行性optimize_pathway_conditions(pathway):推荐最佳条件generate_pathway_report(pathway, filename):创建详细的途径报告
用法:
from scripts.enzyme_pathway_builder import find_pathway_for_product, build_retrosynthetic_tree
# Find pathway to product
pathway = find_pathway_for_product("lactate", max_steps=3)
# Build retrosynthetic tree
tree = build_retrosynthetic_tree("lactate", depth=2)
API 速率限制和最佳实践
速率限制:
- BRENDA API 有中等程度的速率限制
- 建议:持续使用时每秒发送 1 个请求
- 最大值:每 10 秒发送 5 个请求
最佳实践:
- 缓存结果:在本地存储经常访问的酶数据
- 批量查询:尽可能合并相关请求
- 使用精确搜索:尽可能按生物体、底物缩小搜索范围
- 处理缺失数据:并非所有酶都有完整数据
- 验证 EC 编号:确保 EC 编号格式正确
- 添加延迟:在连续请求之间添加延迟
- 合理使用通配符:适当时使用 '*' 扩大搜索范围
- 监控配额:跟踪 API 使用情况
错误处理:
from brenda_client import get_km_values, get_reactions
from zeep.exceptions import Fault, TransportError
try:
km_data = get_km_values("1.1.1.1")
except RuntimeError as e:
print(f"Authentication error: {e}")
except Fault as e:
print(f"BRENDA API error: {e}")
except TransportError as e:
print(f"Network error: {e}")
except Exception as e:
print(f"Unexpected error: {e}")
常见工作流
工作流 1:发现新底物对应的酶
查找适用于特定底物的酶:
from brenda_client import get_km_values
from scripts.brenda_queries import search_enzymes_by_substrate, compare_substrate_affinity
# Search for enzymes that act on substrate
substrate = "2-phenylethanol"
enzymes = search_enzymes_by_substrate(substrate, limit=15)
print(f"Found {len(enzymes)} enzymes for {substrate}")
for enzyme in enzymes:
print(f"EC {enzyme['ec_number']}: {enzyme['enzyme_name']}")
# Get kinetic data for best candidates
if enzymes:
best_ec = enzymes[0]['ec_number']
km_data = get_km_values(best_ec, substrate=substrate)
if km_data:
print(f"Kinetic data for {best_ec}:")
for entry in km_data[:3]: # First 3 entries
print(f" {entry}")
工作流 2:跨生物体比较酶
比较不同生物体中酶的性质:
from scripts.brenda_queries import compare_across_organisms, get_environmental_parameters
# Define organisms for comparison
organisms = [
"Escherichia coli",
"Saccharomyces cerevisiae",
"Bacillus subtilis",
"Thermus thermophilus"
]
# Compare alcohol dehydrogenase
comparison = compare_across_organisms("1.1.1.1", organisms)
print("Cross-organism comparison:")
for org_data in comparison:
print(f"\n{org_data['organism']}:")
print(f" Average Km: {org_data['average_km']}")
print(f" Optimal pH: {org_data['optimal_ph']}")
print(f" Temperature: {org_data['optimal_temperature']}°C")
# Get detailed environmental parameters
env_params = get_environmental_parameters("1.1.1.1")
print(f"\nOverall optimal pH range: {env_params['ph_range']}")
工作流 3:确定酶工程改造目标
寻找改进酶的工程改造机会:
from scripts.brenda_queries import (
find_thermophilic_homologs,
find_ph_stable_variants,
compare_substrate_affinity
)
# Find thermophilic variants for heat stability
thermophilic = find_thermophilic_homologs("1.1.1.1", min_temp=50)
print(f"Found {len(thermophilic)} thermophilic variants")
# Find alkaline-stable variants
alkaline = find_ph_stable_variants("1.1.1.1", min_ph=8.0)
print(f"Found {len(alkaline)} alkaline-stable variants")
# Compare substrate specificities for engineering targets
specificity = compare_substrate_affinity("1.1.1.1")
print("Substrate affinity ranking:")
for i, sub in enumerate(specificity[:5]):
print(f" {i+1}. {sub['name']}: Km = {sub['km']}")
工作流 4:构建酶促途径
构建酶促合成途径:
from scripts.enzyme_pathway_builder import (
find_pathway_for_product,
build_retrosynthetic_tree,
calculate_pathway_feasibility
)
# Find pathway to target product
target = "lactate"
pathway = find_pathway_for_product(target, max_steps=3)
if pathway:
print(f"Found pathway to {target}:")
for i, step in enumerate(pathway['steps']):
print(f" Step {i+1}: {step['reaction']}")
print(f" Enzyme: EC {step['ec_number']}")
print(f" Organism: {step['organism']}")
# Evaluate pathway feasibility
feasibility = calculate_pathway_feasibility(pathway)
print(f"\nPathway feasibility score: {feasibility['score']}/10")
print(f"Potential issues: {feasibility['warnings']}")
工作流 5:动力学参数分析
为酶筛选进行全面的动力学分析:
from brenda_client import get_km_values
from scripts.brenda_queries import parse_km_entry, get_modeling_parameters
from scripts.brenda_visualization import plot_kinetic_parameters
# Get comprehensive kinetic data
ec_number = "1.1.1.1"
km_data = get_km_values(ec_number)
# Analyze kinetic parameters
all_entries = []
for entry in km_data:
parsed = parse_km_entry(entry)
if parsed['km_value']:
all_entries.append(parsed)
print(f"Analyzed {len(all_entries)} kinetic entries")
# Find best kinetic performer
best_km = min(all_entries, key=lambda x: x['km_value'])
print(f"\nBest kinetic performer:")
print(f" Organism: {best_km['organism']}")
print(f" Substrate: {best_km['substrate']}")
print(f" Km: {best_km['km_value']}")
# Get modeling parameters
model_data = get_modeling_parameters(ec_number, substrate=best_km['substrate'])
print(f"\nModeling parameters:")
print(f" Km: {model_data['km']}")
print(f" kcat: {model_data['kcat']}")
print(f" Vmax: {model_data['vmax']}")
# Generate visualization
plot_kinetic_parameters(ec_number)
工作流 6:工业酶筛选
为工业应用筛选酶:
from scripts.brenda_queries import (
find_thermophilic_homologs,
get_environmental_parameters,
get_inhibitors
)
# Industrial criteria: high temperature tolerance, organic solvent resistance
target_enzyme = "1.1.1.1"
# Find thermophilic variants
thermophilic = find_thermophilic_homologs(target_enzyme, min_temp=60)
print(f"Thermophilic candidates: {len(thermophilic)}")
# Check solvent tolerance (inhibitor data)
inhibitors = get_inhibitors(target_enzyme)
solvent_tolerant = [
inv for inv in inhibitors
if 'ethanol' not in inv['name'].lower() and
'methanol' not in inv['name'].lower()
]
print(f"Solvent tolerant candidates: {len(solvent_tolerant)}")
# Evaluate top candidates
for candidate in thermophilic[:3]:
print(f"\nCandidate: {candidate['organism']}")
print(f" Optimal temp: {candidate['optimal_temperature']}°C")
print(f" Km: {candidate['km']}")
print(f" pH range: {candidate.get('ph_range', 'N/A')}")
数据格式和解析
BRENDA 响应格式
BRENDA 会以特定格式返回数据,需要进行解析:
Km 值格式:
organism*Escherichia coli#substrate*ethanol#kmValue*1.2#kmValueMaximum*#commentary*pH 7.4, 25°C#ligandStructureId*#literature*
反应格式:
ecNumber*1.1.1.1#organism*Saccharomyces cerevisiae#reaction*ethanol + NAD+ <=> acetaldehyde + NADH + H+#commentary*#literature*
数据提取模式
import re
def parse_brenda_field(data, field_name):
"""Extract specific field from BRENDA data entry"""
pattern = f"{field_name}\\*([^#]*)"
match = re.search(pattern, data)
return match.group(1) if match else None
def extract_multiple_values(data, field_name):
"""Extract multiple values for a field"""
pattern = f"{field_name}\\*([^#]*)"
matches = re.findall(pattern, data)
return [match for match in matches if match.strip()]
参考文档
如需详细了解 BRENDA 文档,请参阅 references/api_reference.md。其中包括:
- 完整的 SOAP API 方法文档
- 完整的参数列表和格式
- EC 编号结构和验证
- 响应格式规范
- 错误代码和处理方式
- 数据字段定义
- 文献引用格式
故障排除
身份验证错误:
- 检查 .env 文件中的 BRENDA_EMAIL 和 BRENDA_PASSWORD
- 检查拼写是否正确(注意支持旧版 BRENDA_EMIAL)
- 确保 BRENDA 账户处于有效状态且具有 API 访问权限
未返回结果:
- 尝试使用通配符 (*) 进行更宽泛的搜索
- 检查 EC 编号格式(例如,应为 "1.1.1.1",而非 "1.1.1")
- 检查底物拼写和命名
- BRENDA 中某些酶的数据可能有限
速率限制:
- 在请求之间添加延迟(0.5-1 秒)
- 在本地缓存结果
- 使用更具体的查询以减少数据量
- 考虑对多个查询使用批处理操作
网络错误:
- 检查互联网连接
- BRENDA 服务可能暂时不可用
- 几分钟后重试
- 如果受到地理位置限制,可考虑使用 VPN
数据格式问题:
- 使用脚本中提供的解析函数
- BRENDA 数据的格式可能不一致
- 妥善处理缺失字段
- 使用前验证解析后的数据
性能问题:
- 大型查询可能较慢;请缩小搜索范围
- 使用特定的生物体或底物筛选条件
- 对批处理操作考虑使用异步处理
- 使用大型数据集时监控内存用量
其他资源
- BRENDA 主页:https://www.brenda-enzymes.org/
- BRENDA SOAP API 文档:https://www.brenda-enzymes.org/soap.php
- 酶学委员会(EC)编号:https://www.qmul.ac.uk/sbcs/iubmb/enzyme/
- Zeep SOAP 客户端:https://python-zeep.readthedocs.io/
- 酶命名法:https://www.iubmb.org/enzyme/