Python SDK for Scout biomedical workflow APIs.
Project description
TryScout SDK
Python SDK for building biomedical workflows on top of the Scout API.
Install
pip install tryscout-sdk
Quickstart
import scout
from scout.tools import Target, chem, docking
from scout.workflow import Storage, pipeline, rank, report
scout.initialize(api_key="YOUR_SCOUT_API_KEY", base_url="https://api.tryscout.dev")
target = Target.resolve("EGFR")
pipe = pipeline("hit_triage")
pipe.configure(storage=Storage.local(root=".scout"))
pipe.input("compounds")
pipe.input("protein")
pipe.step("deduplicate", lambda compounds: chem.deduplicate(compounds))
pipe.step("filter", lambda deduplicate: deduplicate)
diffdock = pipe.branch("diffdock", from_step="filter")
diffdock.step(
"dock",
lambda filter, protein: docking.predict(
protein=protein,
ligands=filter,
),
)
diffdock.step(
"rank",
lambda filter, dock: rank.by_weighted_score(
items=list(filter),
features={"dock": dock.to_scores()},
weights={"dock": 1.0},
),
)
vina = pipe.branch("vina", from_step="filter")
vina.step(
"dock",
lambda filter, protein: docking.predict(
protein=protein,
ligands=filter,
),
)
vina.step(
"rank",
lambda filter, dock: rank.by_weighted_score(
items=list(filter),
features={"dock": dock.to_scores()},
weights={"dock": 1.0},
),
)
job = pipe.run(
branches=["diffdock", "vina"],
compounds="hits.csv",
protein="egfr.pdb",
)
print(job.id)
print(job.status())
print(job.progress())
print(job.current_step())
run = job.wait()
report.export(run.output("diffdock.rank"), "ranked_hits.html")
Tool calls remain synchronous by default:
pred = property_prediction.predict(molecules="hits.csv")
Optional asynchronous submission is available with .submit(...):
job = docking.submit(protein="egfr.pdb", ligands=["CCO", "CCN"])
result = job.wait()
Pipeline jobs support controls:
job.cancel()
resumed = job.resume()
retried = job.retry(step="diffdock.dock")
branched = job.branch(from_step="filter", name="vina")
# unified resume control on run():
resumed = pipe.run(compounds="hits.csv", protein="egfr.pdb", resume="auto")
from_dock = pipe.run(compounds="hits.csv", protein="egfr.pdb", resume="from:diffdock.dock")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tryscout_sdk-0.1.0a3.tar.gz
(67.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tryscout_sdk-0.1.0a3.tar.gz.
File metadata
- Download URL: tryscout_sdk-0.1.0a3.tar.gz
- Upload date:
- Size: 67.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2cba5c4d7aa02fb520a4e4d51785875730987f4da537f667350b6ab273ba14e
|
|
| MD5 |
208516ffc3c87a52857fd442210ebd3c
|
|
| BLAKE2b-256 |
ce98a9496a7cc920a4b37482f70fdb21265cc56932e8664d9f0f8a98b4fbf028
|
File details
Details for the file tryscout_sdk-0.1.0a3-py3-none-any.whl.
File metadata
- Download URL: tryscout_sdk-0.1.0a3-py3-none-any.whl
- Upload date:
- Size: 71.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1b306e19fb7edad89aad5d594abf19da6cfc011592b9c5a41297e62a2a7861d
|
|
| MD5 |
b9e731c92f7df098f4ca165c747dadd6
|
|
| BLAKE2b-256 |
a2f9b7b34671b0fe0bd01b9e65fe712b8a432c2f173506d0693acbbeb614f9f6
|