matvenus-cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/LICENSE +201 -0
- package/README.md +408 -0
- package/bin/cli.js +3 -0
- package/dist/client.d.ts +13 -0
- package/dist/client.js +62 -0
- package/dist/commands/alphafold_protein_folding.d.ts +2 -0
- package/dist/commands/alphafold_protein_folding.js +262 -0
- package/dist/commands/cancel_tool_result.d.ts +2 -0
- package/dist/commands/cancel_tool_result.js +388 -0
- package/dist/commands/diffdock_protein_ligand_docking.d.ts +2 -0
- package/dist/commands/diffdock_protein_ligand_docking.js +252 -0
- package/dist/commands/esmfold_protein_folding.d.ts +2 -0
- package/dist/commands/esmfold_protein_folding.js +219 -0
- package/dist/commands/get_tool_result.d.ts +2 -0
- package/dist/commands/get_tool_result.js +388 -0
- package/dist/commands/gromacs_analysis.d.ts +2 -0
- package/dist/commands/gromacs_analysis.js +212 -0
- package/dist/commands/gromacs_md.d.ts +2 -0
- package/dist/commands/gromacs_md.js +236 -0
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/index.js +39 -0
- package/dist/commands/predict_functional_residue.d.ts +2 -0
- package/dist/commands/predict_functional_residue.js +234 -0
- package/dist/commands/predict_protein_properties.d.ts +2 -0
- package/dist/commands/predict_protein_properties.js +228 -0
- package/dist/commands/proteinmpnn_sequence_design.d.ts +2 -0
- package/dist/commands/proteinmpnn_sequence_design.js +271 -0
- package/dist/commands/rfdiffusion_protein_design.d.ts +2 -0
- package/dist/commands/rfdiffusion_protein_design.js +333 -0
- package/dist/commands/upload_file_base_64.d.ts +2 -0
- package/dist/commands/upload_file_base_64.js +212 -0
- package/dist/commands/venusg_protein_function_prediction.d.ts +2 -0
- package/dist/commands/venusg_protein_function_prediction.js +234 -0
- package/dist/commands/venusmine_protein_mining.d.ts +2 -0
- package/dist/commands/venusmine_protein_mining.js +212 -0
- package/dist/commands/venusprime_multipoint_prediction.d.ts +2 -0
- package/dist/commands/venusprime_multipoint_prediction.js +322 -0
- package/dist/commands/venusrem_mutation_prediction.d.ts +2 -0
- package/dist/commands/venusrem_mutation_prediction.js +260 -0
- package/dist/commands/venusx_functional_residue_prediction.d.ts +2 -0
- package/dist/commands/venusx_functional_residue_prediction.js +234 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +125 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.js +6 -0
- package/package.json +41 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.register = register;
|
|
4
|
+
const client_1 = require("../client");
|
|
5
|
+
function register(program, baseUrl) {
|
|
6
|
+
program
|
|
7
|
+
.command('venusx-functional-residue-prediction')
|
|
8
|
+
.description('Venusx Functional Residue')
|
|
9
|
+
.option('--body <json>', 'Request body as JSON string', (value) => value)
|
|
10
|
+
.option('--base-url <url>', 'Override base URL')
|
|
11
|
+
.option('--output <format>', 'Output format: json, table', 'json')
|
|
12
|
+
.option('--schema', 'Show API schema and exit')
|
|
13
|
+
.action(async (options) => {
|
|
14
|
+
if (options.schema) {
|
|
15
|
+
console.log(JSON.stringify({
|
|
16
|
+
"method": "post",
|
|
17
|
+
"operationId": "venusx_functional_residue_prediction",
|
|
18
|
+
"summary": "Venusx Functional Residue",
|
|
19
|
+
"tags": [
|
|
20
|
+
"tools-predict"
|
|
21
|
+
],
|
|
22
|
+
"parameters": [],
|
|
23
|
+
"requestBody": {
|
|
24
|
+
"required": true,
|
|
25
|
+
"contentType": "application/json",
|
|
26
|
+
"schema": {
|
|
27
|
+
"properties": {
|
|
28
|
+
"sequence": {
|
|
29
|
+
"anyOf": [
|
|
30
|
+
{
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "null"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"title": "Sequence",
|
|
38
|
+
"description": "Protein sequence in single letter amino acid code"
|
|
39
|
+
},
|
|
40
|
+
"fasta_file": {
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "null"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"title": "Fasta File",
|
|
50
|
+
"description": "OSS URL to FASTA file"
|
|
51
|
+
},
|
|
52
|
+
"task": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"title": "Task",
|
|
55
|
+
"description": "VenusX task: VenusX-Activity (activity site), VenusX-Binding (binding site), VenusX-Evo (conserved site)",
|
|
56
|
+
"default": "VenusX-Activity"
|
|
57
|
+
},
|
|
58
|
+
"mode": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"title": "Mode",
|
|
61
|
+
"description": "Model mode: pro uses Ankh-large (default), light uses ESM2-650M. Model is read from venusx_config.yaml",
|
|
62
|
+
"default": "pro"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"type": "object",
|
|
66
|
+
"title": "VenusXFunctionalResiduePredictionInput",
|
|
67
|
+
"description": "Input for VenusX functional site prediction. Uses venusx_config.yaml; default mode=pro."
|
|
68
|
+
},
|
|
69
|
+
"isBinary": false
|
|
70
|
+
},
|
|
71
|
+
"responses": [
|
|
72
|
+
{
|
|
73
|
+
"statusCode": "200",
|
|
74
|
+
"description": "Successful Response",
|
|
75
|
+
"contentType": "application/json",
|
|
76
|
+
"schema": {
|
|
77
|
+
"properties": {
|
|
78
|
+
"tool_call_id": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"title": "Tool Call Id",
|
|
81
|
+
"description": "系统生成的调用唯一ID"
|
|
82
|
+
},
|
|
83
|
+
"status": {
|
|
84
|
+
"description": "调用状态: running, success, error 等",
|
|
85
|
+
"type": "string",
|
|
86
|
+
"enum": [
|
|
87
|
+
"pending",
|
|
88
|
+
"running",
|
|
89
|
+
"success",
|
|
90
|
+
"error"
|
|
91
|
+
],
|
|
92
|
+
"title": "ToolResultStatus"
|
|
93
|
+
},
|
|
94
|
+
"result": {
|
|
95
|
+
"anyOf": [
|
|
96
|
+
{},
|
|
97
|
+
{
|
|
98
|
+
"type": "null"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"title": "Result",
|
|
102
|
+
"description": "如果即时成功,这里是工具的返回结果字典"
|
|
103
|
+
},
|
|
104
|
+
"error_message": {
|
|
105
|
+
"anyOf": [
|
|
106
|
+
{
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "null"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"title": "Error Message",
|
|
114
|
+
"description": "如果有错误,提供错误信息"
|
|
115
|
+
},
|
|
116
|
+
"credits_cost": {
|
|
117
|
+
"anyOf": [
|
|
118
|
+
{
|
|
119
|
+
"type": "number"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "null"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"title": "Credits Cost",
|
|
126
|
+
"description": "消费积分"
|
|
127
|
+
},
|
|
128
|
+
"tool_name": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"title": "Tool Name",
|
|
131
|
+
"description": "执行的工具名"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"type": "object",
|
|
135
|
+
"required": [
|
|
136
|
+
"tool_call_id",
|
|
137
|
+
"status",
|
|
138
|
+
"tool_name"
|
|
139
|
+
],
|
|
140
|
+
"title": "ToolInvokeResponse"
|
|
141
|
+
},
|
|
142
|
+
"isBinary": false
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"statusCode": "422",
|
|
146
|
+
"description": "Validation Error",
|
|
147
|
+
"contentType": "application/json",
|
|
148
|
+
"schema": {
|
|
149
|
+
"properties": {
|
|
150
|
+
"detail": {
|
|
151
|
+
"items": {
|
|
152
|
+
"properties": {
|
|
153
|
+
"loc": {
|
|
154
|
+
"items": {
|
|
155
|
+
"anyOf": [
|
|
156
|
+
{
|
|
157
|
+
"type": "string"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"type": "integer"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"type": "array",
|
|
165
|
+
"title": "Location"
|
|
166
|
+
},
|
|
167
|
+
"msg": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"title": "Message"
|
|
170
|
+
},
|
|
171
|
+
"type": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"title": "Error Type"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"type": "object",
|
|
177
|
+
"required": [
|
|
178
|
+
"loc",
|
|
179
|
+
"msg",
|
|
180
|
+
"type"
|
|
181
|
+
],
|
|
182
|
+
"title": "ValidationError"
|
|
183
|
+
},
|
|
184
|
+
"type": "array",
|
|
185
|
+
"title": "Detail"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"type": "object",
|
|
189
|
+
"title": "HTTPValidationError"
|
|
190
|
+
},
|
|
191
|
+
"isBinary": false
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"security": [
|
|
195
|
+
"HTTPBearer"
|
|
196
|
+
]
|
|
197
|
+
}, null, 2));
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
try {
|
|
201
|
+
const currentBaseUrl = options.baseUrl || baseUrl;
|
|
202
|
+
const config = { baseUrl: currentBaseUrl };
|
|
203
|
+
const path = '/api/tools/predict/venusx-functional-residue';
|
|
204
|
+
const url = path;
|
|
205
|
+
const body = options.body ? JSON.parse(options.body) : undefined;
|
|
206
|
+
const response = await (0, client_1.request)(config, {
|
|
207
|
+
method: 'post',
|
|
208
|
+
path: url,
|
|
209
|
+
headers: undefined,
|
|
210
|
+
body: body,
|
|
211
|
+
isBinary: false,
|
|
212
|
+
});
|
|
213
|
+
const data = response;
|
|
214
|
+
if (options.output === 'json') {
|
|
215
|
+
console.log(JSON.stringify(data, null, 2));
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
console.log(data);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
catch (error) {
|
|
222
|
+
if (error.status) {
|
|
223
|
+
console.error('API Error:', error.status, error.message);
|
|
224
|
+
if (error.data) {
|
|
225
|
+
console.error(JSON.stringify(error.data, null, 2));
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
console.error('Error:', error.message);
|
|
230
|
+
}
|
|
231
|
+
process.exit(1);
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
package/dist/index.d.ts
ADDED