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.1.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.1.2
File Size Uploaded
osteosarc-0.1.2.tar.gz 160.6 kB Details

Built distribution (wheel)

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

Total release size: 233.7 kB

Release files / osteosarc-0.1.2.tar.gz

Download URL osteosarc-0.1.2.tar.gz
Size 160.6 kB
Tags Source
SHA-256 checksum
How to use checksums
12cb30bcb98a5b2ce8b9d24b29d0b0c94875928d340bbdb58a9c604c7e9836e0
BLAKE2b-256 checksum
How to use checksums
ae5c35948f5f593f53261423cab3de28ba2ec7fd2ec991114e5209de82ac96ac
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.1.2-py3-none-any.whl

Download URL osteosarc-0.1.2-py3-none-any.whl
Size 73.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d7fe9bae52eca37bd7c339b2d4256b78826958ce5271ca2775ea879d99db801
BLAKE2b-256 checksum
How to use checksums
a6a37e8637600b2bd759c51437a45adf5295c2928d7c9c90eec972a9cdda967a
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

0.2.2

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

This release

0.1.2 This release

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