brenda-database
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBRENDA Database
BRENDA数据库
Overview
概述
BRENDA (BRaunschweig ENzyme DAtabase) is the world's most comprehensive enzyme information system, containing detailed enzyme data from scientific literature. Query kinetic parameters (Km, kcat), reaction equations, substrate specificities, organism information, and optimal conditions for enzymes using the official SOAP API. Access over 45,000 enzymes with millions of kinetic data points for biochemical research, metabolic engineering, and enzyme discovery.
BRENDA(不伦瑞克酶数据库)是全球最全面的酶信息系统,包含来自科学文献的详细酶数据。使用官方SOAP API查询酶的动力学参数(Km、kcat)、反应方程式、底物特异性、生物体信息以及最适条件。可访问超过45,000种酶及数百万个动力学数据点,用于生化研究、代谢工程和酶发现。
When to Use This Skill
何时使用该工具
This skill should be used when:
- Searching for enzyme kinetic parameters (Km, kcat, Vmax)
- Retrieving reaction equations and stoichiometry
- Finding enzymes for specific substrates or reactions
- Comparing enzyme properties across different organisms
- Investigating optimal pH, temperature, and conditions
- Accessing enzyme inhibition and activation data
- Supporting metabolic pathway reconstruction and retrosynthesis
- Performing enzyme engineering and optimization studies
- Analyzing substrate specificity and cofactor requirements
在以下场景中可使用本工具:
- 搜索酶动力学参数(Km、kcat、Vmax)
- 检索反应方程式和化学计量关系
- 寻找针对特定底物或反应的酶
- 比较不同生物体间的酶属性
- 研究酶的最适pH、温度及条件
- 获取酶的抑制与激活数据
- 支持代谢途径重构与逆合成分析
- 开展酶工程与优化研究
- 分析底物特异性与辅因子需求
Core Capabilities
核心功能
1. Kinetic Parameter Retrieval
1. 动力学参数检索
Access comprehensive kinetic data for enzymes:
Get Km Values by EC Number:
python
from brenda_client import get_km_values获取酶的全面动力学数据:
通过EC编号获取Km值:
python
from brenda_client import get_km_valuesGet Km values for all organisms
获取所有生物体的Km值
km_data = get_km_values("1.1.1.1") # Alcohol dehydrogenase
km_data = get_km_values("1.1.1.1") # 乙醇脱氢酶
Get Km values for specific organism
获取特定生物体的Km值
km_data = get_km_values("1.1.1.1", organism="Saccharomyces cerevisiae")
km_data = get_km_values("1.1.1.1", organism="Saccharomyces cerevisiae")
Get Km values for specific substrate
获取特定底物的Km值
km_data = get_km_values("1.1.1.1", substrate="ethanol")
**Parse Km Results**:
```python
for entry in km_data:
print(f"Km: {entry}")
# Example output: "organism*Homo sapiens#substrate*ethanol#kmValue*1.2#commentary*"Extract Specific Information:
python
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')}")km_data = get_km_values("1.1.1.1", substrate="ethanol")
**解析Km结果**:
```python
for entry in km_data:
print(f"Km: {entry}")
# 示例输出: "organism*Homo sapiens#substrate*ethanol#kmValue*1.2#commentary*"提取特定信息:
python
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"生物体: {parsed['organism']}")
print(f"底物: {parsed['substrate']}")
print(f"Km值: {parsed['km_value']}")
print(f"pH: {parsed.get('ph', 'N/A')}")
print(f"温度: {parsed.get('temperature', 'N/A')}")2. Reaction Information
2. 反应信息
Retrieve reaction equations and details:
Get Reactions by EC Number:
python
from brenda_client import get_reactions检索反应方程式及详情:
通过EC编号获取反应信息:
python
from brenda_client import get_reactionsGet all reactions for EC number
获取该EC编号的所有反应
reactions = get_reactions("1.1.1.1")
reactions = get_reactions("1.1.1.1")
Filter by organism
按生物体筛选
reactions = get_reactions("1.1.1.1", organism="Escherichia coli")
reactions = get_reactions("1.1.1.1", organism="Escherichia coli")
Search specific reaction
搜索特定反应
reactions = get_reactions("1.1.1.1", reaction="ethanol + NAD+")
**Process Reaction Data**:
```python
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}")reactions = get_reactions("1.1.1.1", reaction="ethanol + NAD+")
**处理反应数据**:
```python
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"反应式: {parsed['reaction']}")
print(f"生物体: {parsed['organism']}")
print(f"底物: {substrates}")
print(f"产物: {products}")3. Enzyme Discovery
3. 酶发现
Find enzymes for specific biochemical transformations:
Find Enzymes by Substrate:
python
from scripts.brenda_queries import search_enzymes_by_substrate寻找用于特定生化转化的酶:
按底物查找酶:
python
from scripts.brenda_queries import search_enzymes_by_substrateFind 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']}")
**Find Enzymes by Product**:
```python
from scripts.brenda_queries import search_enzymes_by_productenzymes = search_enzymes_by_substrate("glucose", limit=20)
for enzyme in enzymes:
print(f"EC编号: {enzyme['ec_number']}")
print(f"酶名称: {enzyme['enzyme_name']}")
print(f"反应式: {enzyme['reaction']}")
**按产物查找酶**:
```python
from scripts.brenda_queries import search_enzymes_by_productFind enzymes that produce lactate
寻找能产生乳酸的酶
enzymes = search_enzymes_by_product("lactate", limit=10)
**Search by Reaction Pattern**:
```python
from scripts.brenda_queries import search_by_patternenzymes = search_enzymes_by_product("lactate", limit=10)
**按反应模式搜索**:
```python
from scripts.brenda_queries import search_by_patternFind oxidation reactions
寻找氧化反应相关的酶
enzymes = search_by_pattern("oxidation", limit=15)
undefinedenzymes = search_by_pattern("oxidation", limit=15)
undefined4. Organism-Specific Enzyme Data
4. 生物体特异性酶数据
Compare enzyme properties across organisms:
Get Enzyme Data for Multiple Organisms:
python
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']}")Find Organisms with Specific Enzyme:
python
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")比较不同生物体间的酶属性:
获取多生物体的酶数据:
python
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"生物体: {org_data['organism']}")
print(f"平均Km值: {org_data['average_km']}")
print(f"最适pH: {org_data['optimal_ph']}")
print(f"温度范围: {org_data['temperature_range']}")查找含有特定酶的生物体:
python
from scripts.brenda_queries import get_organisms_for_enzyme
organisms = get_organisms_for_enzyme("6.3.5.5") # 谷氨酰胺合成酶
print(f"找到{len(organisms)}种含有该酶的生物体")5. Environmental Parameters
5. 环境参数
Access optimal conditions and environmental parameters:
Get pH and Temperature Data:
python
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']}")Cofactor Requirements:
python
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']}")获取酶的最适条件与环境参数:
获取pH与温度数据:
python
from scripts.brenda_queries import get_environmental_parameters
params = get_environmental_parameters("1.1.1.1")
print(f"最适pH范围: {params['ph_range']}")
print(f"最适温度: {params['optimal_temperature']}")
print(f"稳定pH: {params['stability_ph']}")
print(f"温度稳定性: {params['temperature_stability']}")辅因子需求:
python
from scripts.brenda_queries import get_cofactor_requirements
cofactors = get_cofactor_requirements("1.1.1.1")
for cofactor in cofactors:
print(f"辅因子: {cofactor['name']}")
print(f"类型: {cofactor['type']}")
print(f"浓度: {cofactor['concentration']}")6. Substrate Specificity
6. 底物特异性
Analyze enzyme substrate preferences:
Get Substrate Specificity Data:
python
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']}")Compare Substrate Preferences:
python
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']}")分析酶的底物偏好:
获取底物特异性数据:
python
from scripts.brenda_queries import get_substrate_specificity
specificity = get_substrate_specificity("1.1.1.1")
for substrate in specificity:
print(f"底物: {substrate['name']}")
print(f"Km值: {substrate['km']}")
print(f"Vmax: {substrate['vmax']}")
print(f"kcat: {substrate['kcat']}")
print(f"特异性常数: {substrate['kcat_km_ratio']}")比较底物偏好:
python
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]: # Km值最低的前5种底物
print(f"{substrate['name']}: Km = {substrate['km']}")7. Inhibition and Activation
7. 抑制与激活
Access enzyme regulation data:
Get Inhibitor Information:
python
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']}")Get Activator Information:
python
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']}")获取酶的调控数据:
获取抑制剂信息:
python
from scripts.brenda_queries import get_inhibitors
inhibitors = get_inhibitors("1.1.1.1")
for inhibitor in inhibitors:
print(f"抑制剂: {inhibitor['name']}")
print(f"类型: {inhibitor['type']}")
print(f"Ki值: {inhibitor['ki']}")
print(f"IC50: {inhibitor['ic50']}")获取激活剂信息:
python
from scripts.brenda_queries import get_activators
activators = get_activators("1.1.1.1")
for activator in activators:
print(f"激活剂: {activator['name']}")
print(f"作用效果: {activator['effect']}")
print(f"作用机制: {activator['mechanism']}")8. Enzyme Engineering Support
8. 酶工程支持
Find engineering targets and alternatives:
Find Thermophilic Homologs:
python
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']}")Find Alkaline/ Acid Stable Variants:
python
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)寻找酶工程靶点与替代方案:
寻找嗜热同源酶:
python
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"生物体: {enzyme['organism']}")
print(f"最适温度: {enzyme['optimal_temperature']}")
print(f"Km值: {enzyme['km']}")寻找耐碱/耐酸变体:
python
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. Kinetic Modeling
9. 动力学建模
Prepare data for kinetic modeling:
Get Kinetic Parameters for Modeling:
python
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']}")Generate Michaelis-Menten Plots:
python
from scripts.brenda_visualization import plot_michaelis_menten为动力学建模准备数据:
获取建模用动力学参数:
python
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"酶浓度: {model_data['enzyme_conc']}")
print(f"温度: {model_data['temperature']}")
print(f"pH: {model_data['ph']}")生成米氏方程图:
python
from scripts.brenda_visualization import plot_michaelis_mentenGenerate kinetic plots
生成动力学曲线
plot_michaelis_menten("1.1.1.1", substrate="ethanol")
undefinedplot_michaelis_menten("1.1.1.1", substrate="ethanol")
undefinedInstallation Requirements
安装要求
bash
uv pip install zeep requests pandas matplotlib seabornbash
uv pip install zeep requests pandas matplotlib seabornAuthentication Setup
认证设置
BRENDA requires authentication credentials:
- Create .env file:
BRENDA_EMAIL=your.email@example.com
BRENDA_PASSWORD=your_brenda_password- Or set environment variables:
bash
export BRENDA_EMAIL="your.email@example.com"
export BRENDA_PASSWORD="your_brenda_password"- Register for BRENDA access:
- Visit https://www.brenda-enzymes.org/
- Create an account
- Check your email for credentials
- Note: There's also (note the typo) for legacy support
BRENDA_EMIAL
BRENDA需要认证凭据:
- 创建.env文件:
BRENDA_EMAIL=your.email@example.com
BRENDA_PASSWORD=your_brenda_password- 或设置环境变量:
bash
export BRENDA_EMAIL="your.email@example.com"
export BRENDA_PASSWORD="your_brenda_password"- 注册BRENDA访问权限:
- 访问https://www.brenda-enzymes.org/
- 创建账户
- 查收邮箱获取凭据
- 注意:为兼容旧版本,也支持(注意拼写错误)
BRENDA_EMIAL
Helper Scripts
辅助脚本
This skill includes comprehensive Python scripts for BRENDA database queries:
本工具包含用于BRENDA数据库查询的全面Python脚本:
scripts/brenda_queries.py
scripts/brenda_queries.py
Provides high-level functions for enzyme data analysis:
Key Functions:
- : Parse BRENDA Km data entries
parse_km_entry(entry) - : Parse reaction data entries
parse_reaction_entry(entry) - : Extract organism-specific information
extract_organism_data(entry) - : Find enzymes for substrates
search_enzymes_by_substrate(substrate, limit) - : Find enzymes producing products
search_enzymes_by_product(product, limit) - : Compare enzyme properties
compare_across_organisms(ec_number, organisms) - : Get pH and temperature data
get_environmental_parameters(ec_number) - : Get cofactor information
get_cofactor_requirements(ec_number) - : Analyze substrate preferences
get_substrate_specificity(ec_number) - : Get enzyme inhibition data
get_inhibitors(ec_number) - : Get enzyme activation data
get_activators(ec_number) - : Find heat-stable variants
find_thermophilic_homologs(ec_number, min_temp) - : Get parameters for kinetic modeling
get_modeling_parameters(ec_number, substrate) - : Export data to file
export_kinetic_data(ec_number, format, filename)
Usage:
python
from scripts.brenda_queries import search_enzymes_by_substrate, compare_across_organisms提供用于酶数据分析的高级函数:
核心函数:
- : 解析BRENDA的Km数据条目
parse_km_entry(entry) - : 解析反应数据条目
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) - : 获取pH与温度数据
get_environmental_parameters(ec_number) - : 获取辅因子信息
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)
使用示例:
python
from scripts.brenda_queries import search_enzymes_by_substrate, compare_across_organismsSearch for enzymes
搜索酶
enzymes = search_enzymes_by_substrate("glucose", limit=20)
enzymes = search_enzymes_by_substrate("glucose", limit=20)
Compare across organisms
跨生物体比较
comparison = compare_across_organisms("1.1.1.1", ["E. coli", "S. cerevisiae"])
undefinedcomparison = compare_across_organisms("1.1.1.1", ["E. coli", "S. cerevisiae"])
undefinedscripts/brenda_visualization.py
scripts/brenda_visualization.py
Provides visualization functions for enzyme data:
Key Functions:
- : Plot Km and kcat distributions
plot_kinetic_parameters(ec_number) - : Compare organisms
plot_organism_comparison(ec_number, organisms) - : Plot pH activity profiles
plot_pH_profiles(ec_number) - : Plot temperature activity profiles
plot_temperature_profiles(ec_number) - : Visualize substrate preferences
plot_substrate_specificity(ec_number) - : Generate kinetic curves
plot_michaelis_menten(ec_number, substrate) - : Create data for heatmaps
create_heatmap_data(enzymes, parameters) - : Create comprehensive enzyme overview
generate_summary_plots(ec_number)
Usage:
python
from scripts.brenda_visualization import plot_kinetic_parameters, plot_michaelis_menten提供酶数据的可视化函数:
核心函数:
- : 绘制Km与kcat分布
plot_kinetic_parameters(ec_number) - : 比较不同生物体的酶
plot_organism_comparison(ec_number, organisms) - : 绘制pH活性曲线
plot_pH_profiles(ec_number) - : 绘制温度活性曲线
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)
使用示例:
python
from scripts.brenda_visualization import plot_kinetic_parameters, plot_michaelis_mentenPlot kinetic parameters
绘制动力学参数
plot_kinetic_parameters("1.1.1.1")
plot_kinetic_parameters("1.1.1.1")
Generate Michaelis-Menten curve
生成米氏方程曲线
plot_michaelis_menten("1.1.1.1", substrate="ethanol")
undefinedplot_michaelis_menten("1.1.1.1", substrate="ethanol")
undefinedscripts/enzyme_pathway_builder.py
scripts/enzyme_pathway_builder.py
Build enzymatic pathways and retrosynthetic routes:
Key Functions:
- : Find enzymatic pathways
find_pathway_for_product(product, max_steps) - : Build retrosynthetic tree
build_retrosynthetic_tree(target, depth) - : Suggest enzyme alternatives
suggest_enzyme_substitutions(ec_number, criteria) - : Evaluate pathway viability
calculate_pathway_feasibility(pathway) - : Suggest optimal conditions
optimize_pathway_conditions(pathway) - : Create detailed pathway report
generate_pathway_report(pathway, filename)
Usage:
python
from scripts.enzyme_pathway_builder import find_pathway_for_product, build_retrosynthetic_tree构建酶促途径与逆合成路线:
核心函数:
- : 查找酶促合成途径
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)
使用示例:
python
from scripts.enzyme_pathway_builder import find_pathway_for_product, build_retrosynthetic_treeFind pathway to product
查找产物的合成途径
pathway = find_pathway_for_product("lactate", max_steps=3)
pathway = find_pathway_for_product("lactate", max_steps=3)
Build retrosynthetic tree
构建逆合成树
tree = build_retrosynthetic_tree("lactate", depth=2)
undefinedtree = build_retrosynthetic_tree("lactate", depth=2)
undefinedAPI Rate Limits and Best Practices
API速率限制与最佳实践
Rate Limits:
- BRENDA API has moderate rate limiting
- Recommended: 1 request per second for sustained usage
- Maximum: 5 requests per 10 seconds
Best Practices:
- Cache results: Store frequently accessed enzyme data locally
- Batch queries: Combine related requests when possible
- Use specific searches: Narrow down by organism, substrate when possible
- Handle missing data: Not all enzymes have complete data
- Validate EC numbers: Ensure EC numbers are in correct format
- Implement delays: Add delays between consecutive requests
- Use wildcards wisely: Use '*' for broader searches when appropriate
- Monitor quota: Track your API usage
Error Handling:
python
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}")速率限制:
- BRENDA API有适度的速率限制
- 建议:持续使用时每秒1次请求
- 最大值:每10秒5次请求
最佳实践:
- 缓存结果: 将频繁访问的酶数据存储在本地
- 批量查询: 尽可能合并相关请求
- 使用精准搜索: 尽可能按生物体、底物缩小搜索范围
- 处理缺失数据: 并非所有酶在BRENDA中都有完整数据
- 验证EC编号: 确保EC编号格式正确
- 添加延迟: 在连续请求之间添加延迟
- 合理使用通配符: 必要时使用'*'进行更广泛的搜索
- 监控配额: 跟踪你的API使用情况
错误处理示例:
python
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"认证错误: {e}")
except Fault as e:
print(f"BRENDA API错误: {e}")
except TransportError as e:
print(f"网络错误: {e}")
except Exception as e:
print(f"意外错误: {e}")Common Workflows
常见工作流
Workflow 1: Enzyme Discovery for New Substrate
工作流1:针对新底物的酶发现
Find suitable enzymes for a specific substrate:
python
from brenda_client import get_km_values
from scripts.brenda_queries import search_enzymes_by_substrate, compare_substrate_affinity为特定底物寻找合适的酶:
python
from brenda_client import get_km_values
from scripts.brenda_queries import search_enzymes_by_substrate, compare_substrate_affinitySearch 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']}")
substrate = "2-phenylethanol"
enzymes = search_enzymes_by_substrate(substrate, limit=15)
print(f"找到{len(enzymes)}种作用于{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}")undefinedif enzymes:
best_ec = enzymes[0]['ec_number']
km_data = get_km_values(best_ec, substrate=substrate)
if km_data:
print(f"{best_ec}的动力学数据:")
for entry in km_data[:3]: # 前3条结果
print(f" {entry}")undefinedWorkflow 2: Cross-Organism Enzyme Comparison
工作流2:跨生物体酶比较
Compare enzyme properties across different organisms:
python
from scripts.brenda_queries import compare_across_organisms, get_environmental_parameters比较不同生物体间的酶属性:
python
from scripts.brenda_queries import compare_across_organisms, get_environmental_parametersDefine organisms for comparison
定义用于比较的生物体
organisms = [
"Escherichia coli",
"Saccharomyces cerevisiae",
"Bacillus subtilis",
"Thermus thermophilus"
]
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")
comparison = compare_across_organisms("1.1.1.1", organisms)
print("跨生物体比较结果:")
for org_data in comparison:
print(f"\n{org_data['organism']}:")
print(f" 平均Km值: {org_data['average_km']}")
print(f" 最适pH: {org_data['optimal_ph']}")
print(f" 最适温度: {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']}")
undefinedenv_params = get_environmental_parameters("1.1.1.1")
print(f"\n整体最适pH范围: {env_params['ph_range']}")
undefinedWorkflow 3: Enzyme Engineering Target Identification
工作流3:酶工程靶点识别
Find engineering opportunities for enzyme improvement:
python
from scripts.brenda_queries import (
find_thermophilic_homologs,
find_ph_stable_variants,
compare_substrate_affinity
)寻找酶改进的工程机会:
python
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")
thermophilic = find_thermophilic_homologs("1.1.1.1", min_temp=50)
print(f"找到{len(thermophilic)}种耐热变体")
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")
alkaline = find_ph_stable_variants("1.1.1.1", min_ph=8.0)
print(f"找到{len(alkaline)}种耐碱变体")
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']}")
undefinedspecificity = compare_substrate_affinity("1.1.1.1")
print("底物亲和力排名:")
for i, sub in enumerate(specificity[:5]):
print(f" {i+1}. {sub['name']}: Km = {sub['km']}")
undefinedWorkflow 4: Enzymatic Pathway Construction
工作流4:酶促途径构建
Build enzymatic synthesis pathways:
python
from scripts.enzyme_pathway_builder import (
find_pathway_for_product,
build_retrosynthetic_tree,
calculate_pathway_feasibility
)构建酶促合成途径:
python
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']}")
target = "lactate"
pathway = find_pathway_for_product(target, max_steps=3)
if pathway:
print(f"找到合成{target}的途径:")
for i, step in enumerate(pathway['steps']):
print(f" 步骤 {i+1}: {step['reaction']}")
print(f" 酶: EC {step['ec_number']}")
print(f" 生物体: {step['organism']}")
Evaluate pathway feasibility
评估途径可行性
feasibility = calculate_pathway_feasibility(pathway)
print(f"\nPathway feasibility score: {feasibility['score']}/10")
print(f"Potential issues: {feasibility['warnings']}")
undefinedfeasibility = calculate_pathway_feasibility(pathway)
print(f"\n途径可行性评分: {feasibility['score']}/10")
print(f"潜在问题: {feasibility['warnings']}")
undefinedWorkflow 5: Kinetic Parameter Analysis
工作流5:动力学参数分析
Comprehensive kinetic analysis for enzyme selection:
python
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针对酶选择开展全面动力学分析:
python
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_parametersGet comprehensive kinetic data
获取全面的动力学数据
ec_number = "1.1.1.1"
km_data = get_km_values(ec_number)
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")
all_entries = []
for entry in km_data:
parsed = parse_km_entry(entry)
if parsed['km_value']:
all_entries.append(parsed)
print(f"分析了{len(all_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']}")
best_km = min(all_entries, key=lambda x: x['km_value'])
print(f"\n动力学性能最佳的酶:")
print(f" 生物体: {best_km['organism']}")
print(f" 底物: {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']}")
model_data = get_modeling_parameters(ec_number, substrate=best_km['substrate'])
print(f"\n建模参数:")
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)
undefinedplot_kinetic_parameters(ec_number)
undefinedWorkflow 6: Industrial Enzyme Selection
工作流6:工业用酶选择
Select enzymes for industrial applications:
python
from scripts.brenda_queries import (
find_thermophilic_homologs,
get_environmental_parameters,
get_inhibitors
)为工业应用选择合适的酶:
python
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"
target_enzyme = "1.1.1.1"
Find thermophilic variants
寻找耐热变体
thermophilic = find_thermophilic_homologs(target_enzyme, min_temp=60)
print(f"Thermophilic candidates: {len(thermophilic)}")
thermophilic = find_thermophilic_homologs(target_enzyme, min_temp=60)
print(f"耐热候选酶: {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)}")
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"耐溶剂候选酶: {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')}")
undefinedfor candidate in thermophilic[:3]:
print(f"\n候选酶: {candidate['organism']}")
print(f" 最适温度: {candidate['optimal_temperature']}°C")
print(f" Km值: {candidate['km']}")
print(f" pH范围: {candidate.get('ph_range', 'N/A')}")
undefinedData Formats and Parsing
数据格式与解析
BRENDA Response Format
BRENDA响应格式
BRENDA returns data in specific formats that need parsing:
Km Value Format:
organism*Escherichia coli#substrate*ethanol#kmValue*1.2#kmValueMaximum*#commentary*pH 7.4, 25°C#ligandStructureId*#literature*Reaction Format:
ecNumber*1.1.1.1#organism*Saccharomyces cerevisiae#reaction*ethanol + NAD+ <=> acetaldehyde + NADH + H+#commentary*#literature*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*Data Extraction Patterns
数据提取示例
python
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()]python
import re
def parse_brenda_field(data, field_name):
"""从BRENDA数据条目中提取特定字段"""
pattern = f"{field_name}\\*([^#]*)"
match = re.search(pattern, data)
return match.group(1) if match else None
def extract_multiple_values(data, field_name):
"""提取字段的多个值"""
pattern = f"{field_name}\\*([^#]*)"
matches = re.findall(pattern, data)
return [match for match in matches if match.strip()]Reference Documentation
参考文档
For detailed BRENDA documentation, see . This includes:
references/api_reference.md- Complete SOAP API method documentation
- Full parameter lists and formats
- EC number structure and validation
- Response format specifications
- Error codes and handling
- Data field definitions
- Literature citation formats
如需详细的BRENDA文档,请查看,其中包括:
references/api_reference.md- 完整的SOAP API方法文档
- 完整的参数列表与格式
- EC编号结构与验证
- 响应格式规范
- 错误代码与处理方式
- 数据字段定义
- 文献引用格式
Troubleshooting
故障排除
Authentication Errors:
- Verify BRENDA_EMAIL and BRENDA_PASSWORD in .env file
- Check for correct spelling (note BRENDA_EMIAL legacy support)
- Ensure BRENDA account is active and has API access
No Results Returned:
- Try broader searches with wildcards (*)
- Check EC number format (e.g., "1.1.1.1" not "1.1.1")
- Verify substrate spelling and naming
- Some enzymes may have limited data in BRENDA
Rate Limiting:
- Add delays between requests (0.5-1 second)
- Cache results locally
- Use more specific queries to reduce data volume
- Consider batch operations for multiple queries
Network Errors:
- Check internet connection
- BRENDA server may be temporarily unavailable
- Try again after a few minutes
- Consider using VPN if geo-restricted
Data Format Issues:
- Use the provided parsing functions in scripts
- BRENDA data can be inconsistent in formatting
- Handle missing fields gracefully
- Validate parsed data before use
Performance Issues:
- Large queries can be slow; limit search scope
- Use specific organism or substrate filters
- Consider asynchronous processing for batch operations
- Monitor memory usage with large datasets
认证错误:
- 验证.env文件中的BRENDA_EMAIL和BRENDA_PASSWORD
- 检查拼写是否正确(注意兼容旧版本的BRENDA_EMIAL)
- 确保BRENDA账户处于活跃状态且拥有API访问权限
无结果返回:
- 尝试使用通配符(*)进行更广泛的搜索
- 检查EC编号格式(例如"1.1.1.1"而非"1.1.1")
- 验证底物的拼写与命名
- 部分酶在BRENDA中的数据可能有限
速率限制:
- 在请求之间添加0.5-1秒的延迟
- 在本地缓存结果
- 使用更精准的查询以减少数据量
- 考虑对多个查询使用批量操作
网络错误:
- 检查网络连接
- BRENDA服务器可能暂时不可用
- 几分钟后重试
- 若受地域限制,可考虑使用VPN
数据格式问题:
- 使用脚本中提供的解析函数
- BRENDA数据的格式可能存在不一致
- 优雅处理缺失字段
- 使用前验证解析后的数据
性能问题:
- 大型查询可能较慢,需缩小搜索范围
- 使用特定的生物体或底物过滤器
- 考虑对批量操作使用异步处理
- 监控大型数据集的内存使用情况
Additional Resources
额外资源
- BRENDA Home: https://www.brenda-enzymes.org/
- BRENDA SOAP API Documentation: https://www.brenda-enzymes.org/soap.php
- Enzyme Commission (EC) Numbers: https://www.qmul.ac.uk/sbcs/iubmb/enzyme/
- Zeep SOAP Client: https://python-zeep.readthedocs.io/
- Enzyme Nomenclature: https://www.iubmb.org/enzyme/
- 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/