tooluniverse.ensembl_tool 模块¶
Ensembl REST API Tool
This tool provides access to the Ensembl genome browser database for gene lookup, sequence retrieval, variant information, homology data, and more.
- class tooluniverse.ensembl_tool.EnsemblRESTTool[源代码]¶
基类:
BaseToolGeneric Ensembl REST API tool. Handles all Ensembl endpoints based on endpoint template in JSON config. Supports path parameters (e.g., {species}, {id}) and query parameters.
- run(arguments)[源代码]¶
执行该工具。
默认的 BaseTool 实现接受一个可选的参数映射,以便与大多数具体工具实现保持一致,这些实现通常需要一个输入字典。
- 参数:
arguments (
dict, optional) – 工具专用参数stream_callback (
callable, optional) – 用于流式响应的回调use_cache (
bool, optional) – 是否启用了结果缓存validate (
bool, optional) – 是否已执行参数验证
备注
这些附加参数(stream_callback、use_cache、validate)由 run_one_function() 传递,用于提供有关执行的上下文。工具可以利用这些参数进行优化或特殊处理。
为了向后兼容,不接受这些参数的工具仍然可以正常工作——它们将仅接收 arguments 参数。
- class tooluniverse.ensembl_tool.EnsemblLookupGene[源代码]¶
-
Legacy: Lookup gene information by ID or symbol. Use EnsemblRESTTool with endpoint=’/lookup/id/{id}’ instead.
- class tooluniverse.ensembl_tool.EnsemblGetSequence[源代码]¶
-
Legacy: Get DNA or protein sequences. Use EnsemblRESTTool with endpoint=’/sequence/id/{id}’ instead.