strandai) provides idiomatic R functions for owned and public
samples, prediction jobs, and result downloads. Functions use the strand_*
prefix. Prediction results can be returned as a
SpatialExperiment
for downstream Bioconductor pipelines.
Install
Install the released package from r-universe:SpatialExperiment result, install:
Configuration
Full pipeline
One blocking call runs upload, submit, wait, and download:strand_run() returns a strand_predict_result list with job_id,
status, credits_used, marker_outputs (one path per marker under
output_dir), output_dir, and job (the underlying strand_job handle).
A predict.strand_client S3 method dispatches to the same pipeline:
on_progress = function(stage, fraction) ... to follow the four stages
("upload", "submit", "wait", "download").
Samples
strand_samples_list() exposes one cursor-paginated collection with three
exact, case-sensitive scopes:
ownership and canonical id. Owned and public fields
remain distinct:
Pass either branch’s
id to strand_samples_get():
job_count. Public detail contains geometry, live markers, and public asset
URLs; jobs and job_count are absent.
Update owned sample attributes with one patch. NULL omits a field,
clear_name = TRUE restores the filename as the display name, and
character(0) clears user-editable tags:
Cell segmentation
Segmentation belongs to the sample rather than to a prediction job, and it costs no credits. Uploads segment automatically unless the organization or the upload opts out; start or retry it explicitly withstrand_segmentation_start():
instance_id, and each row ties back to the mask
through local_label. The SpatialExperiment from
strand_download_results() is a pixel-grid matrix of marker predictions, not
per-cell expression.
End-to-end
Selecting a model
strand_predict() and strand_run() accept an optional model =:
"v0.7": current dispatchable version and default.
model (or pass NULL) to let the platform pick "v0.7". The older
"v0.4" and "v0.5" labels can appear on historical jobs but are sunset for
new submissions.
strand_predict_result$model (and the model field on strand_job_get()
output) contain the canonical v0.X label the platform ran.
Jobs from before the versioning rollout may surface as "v0.1", a sunset
legacy label: readable on historical jobs, not dispatchable. The retired
2026 "v10*" ids were removed entirely and are rejected with a 400.
Submit without waiting
A full pipeline run blocks for 15+ minutes. To submit without waiting for results, passwait = FALSE. strand_run() returns the strand_job handle as
soon as upload and submission complete:
wait = FALSE, the "wait" and "download" progress stages don’t
fire, and timeout_sec / poll_interval_sec / output_dir are ignored.
Function reference
Error handling
Documented HTTP error codes map to typed conditions you can dispatch on:See also
- SDK quickstart: upload, price, submit, wait, and download.
- REST API overview: the underlying HTTP surface.
- Pricing: how credits map to slides × markers.