Skip to main content

cnverse

Harmonise the outputs of heterogeneous CNV/CNA callers into one unified AnnData, so downstream exploration and visualisation can be written once.

cnverse is a thin interoperability layer, not another CNV caller. You run XClone / Numbat / CalicoST / inferCNV / CopyKAT yourself; cnverse reads each one's output and returns an AnnData with a consistent layout.

import cnverse as cnv

adata = cnv.io.read_xclone("path/to/xclone_out/")
cnv.schema.validate(adata)
# -> AnnData (cells x segments) with a canonical schema, ready to explore

Supported readers

modality tool flavour reader status
scRNA-seq inferCNV expression-only read_infercnv working
scRNA-seq CopyKAT expression-only read_copykat working
scRNA-seq Numbat allele-aware read_numbat best-effort scaffold
scRNA-seq XClone allele-aware read_xclone best-effort scaffold
spatial CalicoST allele-specific read_calicost scaffold (NotImplemented)

The allele-aware readers expose their tool-specific column names as constants at the top of each module — edit those to match your installed version rather than rewriting the reader.

Canonical schema (v0.1)

  • X — primary continuous CNV signal; its meaning is recorded in uns["cnverse"]["x_meaning"].
  • var — genomic features (gene | segment | bin) with chrom, start, end, feature_type.
  • obs — clone, clone_prob, ploidy_status, cnverse_tool.
  • layers — any of total_cn, major_cn, minor_cn, cnv_state, baf, rdr, prob.
  • obsm["spatial"] — coordinates for spatial modalities.
  • uns["cnverse"] — provenance + cnv_states legend; uns["clone_tree"] for tools that infer a phylogeny.

See cnverse/schema.py for the authoritative definition.

Install (dev)

pip install -e ".[dev]"
pytest

Adding a tool

Create src/cnverse/io/<tool>.py with a read_<tool>(...) that returns cnverse.schema.make_cnv_anndata(...), then re-export it from src/cnverse/io/__init__.py.

Release files for cnverse 0.1.0

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

Source distribution (sdist)

Source distribution for cnverse 0.1.0
File Size Uploaded
cnverse-0.1.0.tar.gz 16.6 kB Details

Built distribution (wheel)

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

Total release size: 36.1 kB

Release files / cnverse-0.1.0.tar.gz

Download URL cnverse-0.1.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f3eb09f05fa8092c236c7a78ae25522989a0fb865bd62f545c4cc15ce6189d7a
BLAKE2b-256 checksum
How to use checksums
cafcf524a51a7be108b68c6bb895e8cc375e4cac2cf65f076d80a7b99f99d5bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / cnverse-0.1.0-py3-none-any.whl

Download URL cnverse-0.1.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fcbb54d07600839617523f6a2a6f121e5250322b8646949229abb01b002a590
BLAKE2b-256 checksum
How to use checksums
0d94100a680590697766dd174ae55be704da64d12101699254bbe64250a46e57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

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