Skip to main content

osteosarc

Python tools for working with the public osteosarc.com dataset. Find sequencing files, look up variants and vaccine peptides, and fetch reads around a variant without downloading an entire BAM.

Documentation · Examples for Varcode, Isovar, Topiary, and Vaxrank

Install

python -m pip install osteosarc

Requires Python 3.10+ and Linux or macOS. Read extraction also needs samtools on PATH; see the read extraction guide.

Find samples and sequencing files

from osteosarc import Dataset

data = Dataset.sync("baseline")
print(data.describe_samples())

baseline is a name you choose for the local metadata snapshot. The first sync fetches about 57 MB; sequencing files stay remote until requested.

T0_tumor is the primary tumor specimen from the T0 collection timepoint (2022-12-16). T0_blood is blood from that same timepoint. Sample type is the tissue field; sequencing assay is a separate choice:

Data available for T0_tumor Assay filter
Bulk RNA sequencing rna-seq
Bulk whole-exome DNA sequencing wes
Bulk whole-genome DNA sequencing wgs

Find its bulk RNA alignments:

rna = data.assets_for_sample("T0_tumor", kind="alignment", assay="rna-seq")
for asset in rna:
    print(asset.key)

rna-seq means bulk RNA; scrna-seq means single-cell RNA. A specimen can have both, as T1_tumor does. platform="ont" or "pacbio" selects a sequencing technology separately. See sample IDs and assay names for the full vocabulary and platform availability.

Select variants

targets = data.variants(gene="DYNC1H1", status="ready")
for variant in targets:
    print(variant.id, variant.allele)

Variant status describes whether its genomic allele is usable. ready means one consistent chromosome, position, REF and ALT, with literal DNA bases. Read support, somatic status and protein effects need separate analysis. Omit the filter to include unresolved entries; see all statuses. Alleles are (chromosome, one-based position, REF, ALT).

Fetch reads around those variants

source = rna[
    "rna-seq/reprocessed/BG003082/BG003082.Aligned.sortedByCoord.out.md.bam"
]
reads = data.extract_reads(source, variants=targets, padding=100)
print(reads.path)  # Local indexed BAM

This retrieves overlapping reads from the chosen BAM and checks its assembly. Use Isovar to classify reference- and alternate-supporting reads.

Downloads use datacache and the shared OpenVax cache. The same extraction request reuses its cached result. To reopen the snapshot offline:

data = Dataset.open("baseline")

Use offline=False to acquire more data. Set OSTEOSARC_CACHE for a separate cache directory. To refresh metadata, choose a new snapshot name with Dataset.sync("next-snapshot", refresh=True).

Use the command line

osteosarc sync baseline
osteosarc samples baseline
osteosarc variants baseline --gene MAP2
osteosarc timeline baseline --since 2024-05 --until 2024-09
osteosarc explore baseline

The explorer lets you browse specimens, files, variants, and the timeline. Type help for commands and quit to leave.

About the data

Documented source corrections are applied by default. Use Dataset.open("baseline", corrections=False) to inspect the published values. See corrections for the changes and their evidence.

Code is Apache-2.0. The dataset is listed as CC0-1.0 in the AWS Open Data Registry. Cite the dataset and access date when using it.

Development

python -m pip install -e '.[test]'
ruff check osteosarc tests scripts
python -m pytest -q

See testing for build and live-example checks.

Release files for osteosarc 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osteosarc 0.2.2
File Size Uploaded
osteosarc-0.2.2.tar.gz 201.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for osteosarc 0.2.2
File Interpreter ABI Platform
osteosarc-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 298.3 kB

Release files / osteosarc-0.2.2.tar.gz

Download URL osteosarc-0.2.2.tar.gz
Size 201.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d148f4c0d9cbf96b80e2e315cbae4ac7459439cbe5bd0dad207eb9fff13c7395
BLAKE2b-256 checksum
How to use checksums
1c1f5efdbb49e32556d7b748226da912c637efb00aaaf065439ee9902e3ad435
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / osteosarc-0.2.2-py3-none-any.whl

Download URL osteosarc-0.2.2-py3-none-any.whl
Size 96.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65561e90fe46f9c55cc994e64ca3dd83b9d2ba6d8f6312a62b02070957e1359a
BLAKE2b-256 checksum
How to use checksums
a568459aa02a361d2fb1dabf4d8e3e54e13be127ac20dcd8d39ae969cdf4b0de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release history Release notifications | RSS feed

0.2.4

2 release files

0.2.3

2 release files

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page