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.
Get started
Save a snapshot and see which samples and sequencing types are available:
from osteosarc import Dataset
data = Dataset.sync("baseline")
print(data.describe_samples())
rna = data.assets_for_sample("T0_tumor", kind="alignment", assay="rna-seq")
for asset in rna:
print(asset.key, asset.size)
for variant in data.variants("vaccine", status="ready"):
print(variant.gene, variant.allele)
The first sync downloads about 57 MB of metadata. BAMs and FASTQs stay remote until you request them. To use the saved snapshot later, without network access:
data = Dataset.open("baseline")
Downloads use datacache and the shared OpenVax cache. Set OSTEOSARC_CACHE to choose a
separate directory. Snapshot names are fixed; use a new name with
Dataset.sync("next-snapshot", refresh=True) to fetch updated metadata.
Fetch reads around a variant
data = Dataset.open("baseline", offline=False)
targets = data.variants(ids=["DYNC1H1-chr14-101980529"], status="ready")
source = rna[
"rna-seq/reprocessed/BG003082/BG003082.Aligned.sortedByCoord.out.md.bam"
]
subset = data.extract_reads(
source, variants=targets, padding=100,
)
print(subset.path) # Local BAM, with an index
The library checks the alignment's assembly and caches the result for reuse. See read extraction for filters, paired mates, and local BAMs.
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.
A variant marked ready has a usable literal allele; this is not independent
validation. 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| osteosarc-0.1.1.tar.gz | 129.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| osteosarc-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 197.1 kB
Release files / osteosarc-0.1.1.tar.gz
| Download URL | osteosarc-0.1.1.tar.gz |
|---|---|
| Size | 129.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7beb2dc35e30a98e0f29241bef5fb3c04ad0e816cd40bcaff615305a4c3e35b3
|
|
BLAKE2b-256 checksum How to use checksums |
b4177cb47a551bf56913dbd0f28a9552433bd0dfc8af9696ae7080f1a5ae1b2d
|
| 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.1-py3-none-any.whl
| Download URL | osteosarc-0.1.1-py3-none-any.whl |
|---|---|
| Size | 68.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df1148c71a9d2a1e788599a67e664ba058098861e8f3358acd5ebd7386da15c3
|
|
BLAKE2b-256 checksum How to use checksums |
6124d2b0663a3c367aa542dd413160e796dba7671f7dd2a6500b1da978951763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|