Install and prepare a slide¶
Turn one H&E slide into an Aurora-ready sample for molecular exploration. Preparation runs on your machine. The package checks the tissue and creates the archive you will submit for prediction.
Route · Send your slides
To send a slide without writing code, upload it on the website with Aurora Direct.
Analysis is for academic and non-profit research. Commercial evaluation and use are governed by a written agreement with Aurora. Discuss commercial access.
1. Install the package¶
These pages were built from version 0.1.0.dev7 of the package, which is unreleased. The last published version is 0.1.0.dev6, and a call on these pages may be missing from it. auroraomics --version prints the one you have.
The package reference lists Python requirements, optional installs and licensing. Get access and sign in before running the example: it reads the model's input requirements from Aurora.
2. Prepare your slide¶
Start with a readable H&E scan. The package reads its resolution from the file and uses the selected model's physical scale. Aurora supplies the quality standard used to check the tiles.
Not executed — needs your slide and API access
Replace slide.svs with your slide file. Sign in before running this example.
import auroraomics as ao
with ao.Client() as client:
card = next(m for m in client.models() if "patches" in m["accepts"]["observations"])
settings = client.qc_thresholds()
with ao.open_slide("slide.svs") as slide:
report = ao.pack_tiles(
slide,
"sample.zip",
mpp=slide.mpp,
patch_um=card["input_spec"]["patch_um"],
thresholds=settings,
)
print(report.written, "tiles kept of", report.considered, "candidates")
print(report.rejected_by_reason)
mpp means micrometres per pixel. Read it from the slide metadata; never assume it.
If the file has no resolution metadata,
supply a verified value when opening it. Correct scale is essential to reading
the tissue and placing the result on the slide.
The package reads regions as it needs them, so the whole slide need not fit in memory. If it reports a slow file layout, re-save the scan as a tiled image.
3. Check the prepared sample¶
Inspect how much tissue was retained and review excluded regions with Check tile quality. The package can also validate the archive before you upload it:
Not executed — needs the archive prepared above
Run this after creating sample.zip.
with ao.read_archive("sample.zip") as archive:
print(len(archive), "tiles at", archive.mpp, "µm/px")
Next¶
-
From slide to result: upload the
sample.zipyou packed, submit it and download one.h5ad. -
Check tile quality if the packer dropped more than you expected. It says what each reason means and what to change.
-
Get access, if you have not asked yet. Access is granted per account, so ask before you need it.
To keep original images in your environment, continue with local image processing, which needs an API key.
The input file reference lists the files Aurora accepts.