Skip to main content

1. Harmonise CNV/CNA caller outputs (Numbat, XClone, CalicoST, inferCNV, CopyKAT, ...) into a unified AnnData. 2. General CNV visualization and exploration

Project description

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.
  • obsclone, 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cnverse-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cnverse-0.1.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file cnverse-0.1.0.tar.gz.

File metadata

  • Download URL: cnverse-0.1.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for cnverse-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f3eb09f05fa8092c236c7a78ae25522989a0fb865bd62f545c4cc15ce6189d7a
MD5 60641a3c9a6a71871de9124aae0e7ad1
BLAKE2b-256 cafcf524a51a7be108b68c6bb895e8cc375e4cac2cf65f076d80a7b99f99d5bb

See more details on using hashes here.

File details

Details for the file cnverse-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cnverse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for cnverse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fcbb54d07600839617523f6a2a6f121e5250322b8646949229abb01b002a590
MD5 2331563d99c4faee5786eec285fa391c
BLAKE2b-256 0d94100a680590697766dd174ae55be704da64d12101699254bbe64250a46e57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page