Compiling clinical reference data with Glass Bio
“I’ve sampled all these cells now, but what are they?”
Glass Bio helps you in two ways:
- We host Astral, a live catalog of over 300,000 cell clusters from thousands of samples. This catalog is easily searchable and will help you compare your samples to thousands of literature and clinical references.
- We expose a proprietary cell type annotation model that you can call on demand.
As a case study, we compare Sid Sijbrandij’s public osteosarcoma data with clinical references in Astral.
We start by to our platform, and then we with our annotation model - taking just a few clicks.
Once we have our sample annotated, we find relevant reference datasets in the catalog for each cell type, yielding dozens of relevant contrasts. From these contrasts, we calculate a spectrum of gene scores and find out where our samples place.
Macrophages
Grey dots represent catalog references. Red dots represent Sid’s T1, T2, and T3 osteosarcoma biopsy and surgery samples. All three patient samples exceed 93% of references for C1Q expression and 96% for inhibitory signaling.
In osteosarcoma cohorts, higher C1Q expression and C1Q-positive macrophage signatures were associated with longer overall survival. High inhibitory-gene expression points to macrophages that can dampen the immune response.
IFN-response scores rise from 0.309 at T1 to 2.083 at T2 and 2.222 at T3. Both later samples exceed every selected macrophage reference. MHC-II presentation also rises. Together, these scores show a stronger inflammatory and antigen-presentation program in the later samples.
T cells
Exhaustion-associated expression rises across T1, T2, and T3 without a parallel rise in cytotoxicity. This pattern points to sustained T-cell stimulation after immunotherapy.
Tumor candidates
Later samples show higher MHC-I and IFN scores. These cells express more of the machinery that displays tumor antigens to T cells, alongside a stronger interferon response.
Install the Glass CLI, or paste this prompt into your agent:
Use curl to read https://glass.bio/install.md and follow the instructions to install the Glass CLI and help me sign in. Find macrophages in one reference sample:
glass astral select --organism human --atlas-version 1791000338408 \
--study-id 965 --annotation-level 4 --cell-type Macrophages \
--sample SRX10306544 --json > sample.json Download all 185 macrophage reference centroids and 36,601 genes into a JSON array. Run with uv:
curl -fsSLO https://glass.bio/blog/osteosarcoma-reference/centroids.py
uv run centroids.py C1QA, C1QB, C1QC, and APOE values in counts/10k for one macrophage preparation:
python3 - <<'PY'
import json
from math import log1p
centroids = json.load(open("centroids.json"))
genes = {g["symbol"]: g["geneId"] for g in json.load(open("genes.json"))}
rows = [r for r in centroids if r["sample"] == "SRX10306544"]
n_cells = sum(r["n_cells"] for r in rows)
values = {g: sum(r[genes[g]] * r["n_cells"] for r in rows) / n_cells
for g in ["C1QA", "C1QB", "C1QC", "APOE"]}
print(json.dumps(values, indent=2))
print("C1Q score:", sum(log1p(v) for v in values.values()) / len(values))
PY {
"C1QA": 38.91778811655287,
"C1QB": 45.32942289437122,
"C1QC": 19.301603366042293,
"APOE": 58.548359745461
}
C1Q score: 3.655021975671648 Use the scores as scatterplot coordinates. This code uses the saved gene means and gene sets for all four comparisons.
curl -fsSLO https://glass.bio/blog/osteosarcoma-reference/plot_scores.py
uv run plot_scores.py