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('predict-functional-residue')
|
|
8
|
+
.description('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": "predict_functional_residue",
|
|
18
|
+
"summary": "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
|
+
"model_name": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"title": "Model Name",
|
|
55
|
+
"description": "Model name for function prediction, Optional model names: ESM2-650M, Ankh-large, ProtT5-xl-uniref50 ",
|
|
56
|
+
"default": "ESM2-650M"
|
|
57
|
+
},
|
|
58
|
+
"task": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"title": "Task",
|
|
61
|
+
"description": "Task: Activity Site, Binding Site, Conserved Site, Motif",
|
|
62
|
+
"default": "Activity Site"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"type": "object",
|
|
66
|
+
"title": "ResidueFunctionPredictionInput",
|
|
67
|
+
"description": "Input for functional residue prediction"
|
|
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/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
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
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('predict-protein-properties')
|
|
8
|
+
.description('Protein Properties')
|
|
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": "predict_protein_properties",
|
|
18
|
+
"summary": "Protein Properties",
|
|
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 PDB structure file or FASTA file"
|
|
51
|
+
},
|
|
52
|
+
"task_name": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"title": "Task Name",
|
|
55
|
+
"description": "Task name: Physical and chemical properties, Relative solvent accessible surface area (PDB only), SASA value (PDB only), Secondary structure (PDB only)",
|
|
56
|
+
"default": "Physical and chemical properties"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"type": "object",
|
|
60
|
+
"title": "ProteinPropertiesInput",
|
|
61
|
+
"description": "Input for protein properties generation"
|
|
62
|
+
},
|
|
63
|
+
"isBinary": false
|
|
64
|
+
},
|
|
65
|
+
"responses": [
|
|
66
|
+
{
|
|
67
|
+
"statusCode": "200",
|
|
68
|
+
"description": "Successful Response",
|
|
69
|
+
"contentType": "application/json",
|
|
70
|
+
"schema": {
|
|
71
|
+
"properties": {
|
|
72
|
+
"tool_call_id": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"title": "Tool Call Id",
|
|
75
|
+
"description": "系统生成的调用唯一ID"
|
|
76
|
+
},
|
|
77
|
+
"status": {
|
|
78
|
+
"description": "调用状态: running, success, error 等",
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": [
|
|
81
|
+
"pending",
|
|
82
|
+
"running",
|
|
83
|
+
"success",
|
|
84
|
+
"error"
|
|
85
|
+
],
|
|
86
|
+
"title": "ToolResultStatus"
|
|
87
|
+
},
|
|
88
|
+
"result": {
|
|
89
|
+
"anyOf": [
|
|
90
|
+
{},
|
|
91
|
+
{
|
|
92
|
+
"type": "null"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"title": "Result",
|
|
96
|
+
"description": "如果即时成功,这里是工具的返回结果字典"
|
|
97
|
+
},
|
|
98
|
+
"error_message": {
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "null"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"title": "Error Message",
|
|
108
|
+
"description": "如果有错误,提供错误信息"
|
|
109
|
+
},
|
|
110
|
+
"credits_cost": {
|
|
111
|
+
"anyOf": [
|
|
112
|
+
{
|
|
113
|
+
"type": "number"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "null"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"title": "Credits Cost",
|
|
120
|
+
"description": "消费积分"
|
|
121
|
+
},
|
|
122
|
+
"tool_name": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"title": "Tool Name",
|
|
125
|
+
"description": "执行的工具名"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"type": "object",
|
|
129
|
+
"required": [
|
|
130
|
+
"tool_call_id",
|
|
131
|
+
"status",
|
|
132
|
+
"tool_name"
|
|
133
|
+
],
|
|
134
|
+
"title": "ToolInvokeResponse"
|
|
135
|
+
},
|
|
136
|
+
"isBinary": false
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"statusCode": "422",
|
|
140
|
+
"description": "Validation Error",
|
|
141
|
+
"contentType": "application/json",
|
|
142
|
+
"schema": {
|
|
143
|
+
"properties": {
|
|
144
|
+
"detail": {
|
|
145
|
+
"items": {
|
|
146
|
+
"properties": {
|
|
147
|
+
"loc": {
|
|
148
|
+
"items": {
|
|
149
|
+
"anyOf": [
|
|
150
|
+
{
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "integer"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"type": "array",
|
|
159
|
+
"title": "Location"
|
|
160
|
+
},
|
|
161
|
+
"msg": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"title": "Message"
|
|
164
|
+
},
|
|
165
|
+
"type": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"title": "Error Type"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"type": "object",
|
|
171
|
+
"required": [
|
|
172
|
+
"loc",
|
|
173
|
+
"msg",
|
|
174
|
+
"type"
|
|
175
|
+
],
|
|
176
|
+
"title": "ValidationError"
|
|
177
|
+
},
|
|
178
|
+
"type": "array",
|
|
179
|
+
"title": "Detail"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"type": "object",
|
|
183
|
+
"title": "HTTPValidationError"
|
|
184
|
+
},
|
|
185
|
+
"isBinary": false
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"security": [
|
|
189
|
+
"HTTPBearer"
|
|
190
|
+
]
|
|
191
|
+
}, null, 2));
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
try {
|
|
195
|
+
const currentBaseUrl = options.baseUrl || baseUrl;
|
|
196
|
+
const config = { baseUrl: currentBaseUrl };
|
|
197
|
+
const path = '/api/tools/predict/protein-properties';
|
|
198
|
+
const url = path;
|
|
199
|
+
const body = options.body ? JSON.parse(options.body) : undefined;
|
|
200
|
+
const response = await (0, client_1.request)(config, {
|
|
201
|
+
method: 'post',
|
|
202
|
+
path: url,
|
|
203
|
+
headers: undefined,
|
|
204
|
+
body: body,
|
|
205
|
+
isBinary: false,
|
|
206
|
+
});
|
|
207
|
+
const data = response;
|
|
208
|
+
if (options.output === 'json') {
|
|
209
|
+
console.log(JSON.stringify(data, null, 2));
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
console.log(data);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
if (error.status) {
|
|
217
|
+
console.error('API Error:', error.status, error.message);
|
|
218
|
+
if (error.data) {
|
|
219
|
+
console.error(JSON.stringify(error.data, null, 2));
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
console.error('Error:', error.message);
|
|
224
|
+
}
|
|
225
|
+
process.exit(1);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|