更新时间:2022-11-29 GMT+08:00
分享

查询分子搜索任务

功能介绍

通过分子搜索任务ID查询分子搜索任务状态及结果。

URI

GET /v1/{project_id}/task/search/{task_id}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

华为云项目id

task_id

String

分子搜索任务ID

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户 token

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

status

String

异步任务的状态:等待中、运行中、已完成、失败

枚举值:

  • waiting
  • running
  • finished
  • failed

task_data

SearchTaskData object

分子搜索任务的请求体

result

SearchResult object

分子搜索任务的返回结果

表4 SearchTaskData

参数

参数类型

描述

smiles

String

分子SMILES表达式

databases

Array of strings

搜索使用到的数据库集合

top_n

Integer

期望最大返回条目数(排序后取Top)

最小值:1

最大值:1000

表5 SearchResult

参数

参数类型

描述

smiles

String

分子SMILES表达式

databases

Array of strings

搜索使用到的数据库集合

top_n

Integer

期望返回的条目数

prop_names

Array of strings

分子ADMET属性名列表

query

query object

初始查询分子的属性信息

result

Array of SearchResultItem objects

查询结果列表

表6 query

参数

参数类型

描述

smiles

String

分子SMILES表达式

props

Array of objects

分子ADMET属性值列表

表7 SearchResultItem

参数

参数类型

描述

smiles

String

分子SMILES表达式

source

String

分子所属的数据库来源

score

Float

分子与查询分子的相似度

props

Array of objects

分子ADMET属性值列表

请求示例

响应示例

状态码: 200

分子搜索任务查询成功响应

{ 
  "status" : "finished", 
  "result" : { 
    "smiles" : "c1ccccc1", 
    "databases" : [ "drug_space_x", "drug_bank" ], 
    "top_n" : 100, 
    "prop_names" : [ "formula", "ab", "acute_toxicity_rule", "bace" ], 
    "query" : { 
      "smiles" : "c1ccccc1", 
      "props" : [ "C6H6", "base", 0, 0.128335 ] 
    }, 
    "result" : [ { 
      "smiles" : "c1ccccc1", 
      "source" : "drug_bank", 
      "score" : 0.388029, 
      "props" : [ "C6H6", "base", 0, 0.128335 ] 
    }, { 
      "smiles" : "C1CCCCC1", 
      "source" : "drug_bank:drug_space_x", 
      "score" : 0.388029, 
      "props" : [ "C6H12", "base", 0, 0.163034 ] 
    } ] 
  } 
}

状态码

状态码

描述

200

分子搜索任务查询成功响应

404

分子搜索任务ID不存在

错误码

请参见错误码

分享:

    相关文档

    相关产品