# Prosperousplus

Protease-specific substrate cleavage site prediction with ProsperousPlus. Provide protein sequences by uploading a FASTA (or plain-text, one sequence per line) file and/or pasting sequences into the sequences text box, select one or more pre-trained protease models (MEROPS identifiers), and get per-position cleavage predictions (score per site).

## 基础信息

| 项目 | 值 |
|------|-----|
| Base URL | `https://sciminer.tech/console/api` |
| API Endpoint | `/v1/internal/tools/invoke` |
| Content-Type | `application/json` |
| Authentication | `X-Auth-Token: <YOUR_API_KEY>` |

## 1. Predict Async

**Tool Name:** `predict_async_predict_async_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `proteases` | `select_array` | ✗ | MEROPS protease identifier (multi-select, up to 5). Each runs an independent pre-trained model to predict cleavage; results are returned per protease (protease column). Naming: first letter = catalytic type, then 'family.subtype' (e.g. C14.001).
Catalytic types: A=aspartic, C=cysteine, M=metallo, S=serine, G=glutamic, N=asparagine; X*/CLE_* are custom/unclassified models.
Common families (counts available in this tool):
  S01(30) trypsin/chymotrypsin-like serine proteases - cleave after basic residues (K/R), e.g. S01.001=trypsin-1;
  C14(6)  caspases (apoptosis), e.g. C14.001=Caspase-1, C14.003=Caspase-8;
  M10(9)  matrix metalloproteinases (MMP), e.g. M10.001=MMP-1 collagenase;
  M12(12) astacin/venom metalloprotease-like; S08(10) subtilisin-like;
  M13     ACE/neurolysin-like; A01(3) pepsin/cathepsin D-like aspartic proteases.
Unsure? Start with S01.001 / C14.001 / M10.001 for a quick comparison. | `A01.001`, `A01.009`, `A01.010`, `A02.001`, `A32.002`, `C01.009`, `C01.032`, `C01.034`, `C01.036`, `C01.060`, `C01.070`, `C02.001`, `C02.002`, `C13.004`, `C14.001`, `C14.003`, `C14.004`, `C14.005`, `C14.006`, `C14.009`, `C25.002`, `CLE_C14`, `CLE_M24`, `G01.002`, `M04.001`, `M04.005`, `M09.002`, `M09.003`, `M09.005`, `M10.001`, `M10.002`, `M10.003`, `M10.004`, `M10.005`, `M10.008`, `M10.009`, `M10.013`, `M10.014`, `M12.001`, `M12.002`, `M12.004`, `M12.005`, `M12.032`, `M12.033`, `M12.140`, `M12.144`, `M12.210`, `M12.217`, `M12.221`, `M12.225`, `M13.001`, `M13.002`, `M14.017`, `M16.002`, `M16.003`, `M16.009`, `M16.016`, `M24.001`, `M24.002`, `M24.026`, `M24.028`, `M35.004`, `N10.002`, `N10.004`, `S01.001`, `S01.010`, `S01.017`, `S01.021`, `S01.029`, `S01.047`, `S01.072`, `S01.131`, `S01.133`, `S01.134`, `S01.135`, `S01.136`, `S01.139`, `S01.140`, `S01.153`, `S01.161`, `S01.162`, `S01.212`, `S01.216`, `S01.217`, `S01.224`, `S01.233`, `S01.236`, `S01.251`, `S01.269`, `S01.278`, `S01.280`, `S01.302`, `S01.308`, `S08.001`, `S08.070`, `S08.071`, `S08.072`, `S08.073`, `S08.074`, `S08.075`, `S08.076`, `S08.077`, `S08.109`, `S26.001`, `S26.008`, `S26.010`, `XM12-001`, `XS26-001`, `XT01-001` |
| `predictfile` | `file` | ✗ | Protein sequences in FASTA format (fasta/fa/txt); or plain text with one sequence per line (headers optional). Combined with the sequences field when both are given. Full-length proteins accepted; every position is scanned with an 8-aa sliding window. Max 200 sequences / 20000 windows.<br/>file suffix: `fasta`, `fa`, `txt` |  |
| `sequences` | `string` | ✗ | One sequence per line, separated by newlines (whitespace in a line is removed). FASTA headers are optional: '>' lines are kept as ids, headerless lines are auto-named seq1, seq2, ... Combined with the uploaded file (if any); either source alone is enough. Max 200 sequences / 20000 windows. |  |
| `plot` | `boolean` | ✗ | Generate per-sequence cleavage-site visualization plots; when enabled the SVG bar charts of predicted high-confidence sites are returned as images in the result (optional, default: False). |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "Prosperousplus",
    "tool_name": "predict_async_predict_async_post",
    "parameters": {
    "proteases": [
        "OPTION VALUE1",
        "OPTION VALUE2"
    ],
    "predictfile": "<PREDICTFILE_FILE_ID>",
    "sequences": "<SEQUENCES>",
    "plot": false
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## User Interface URL

> When the user needs a tool recommendation, output the URL.

**URL:** <https://sciminer.tech/utility/tool/Prosperousplus>
