Skip to content

iscc.data.DNA

DNA(breadth='wgs', target_genes='all', data_mode='counts', depth_model='dm', n_reads=None, seed=42, batch_label=None, fpr=None, fnr=None, **hyper_overrides)

Bases: Assay

Base DNA assay: breadth + the shared DNABatch coverage core.

Holds the breadth / locus-selection logic and assembles the per-locus ground truth (copy number + true alt fraction) that the bulk / single-cell subclasses pass through the shared depth + allele layers. Subclasses set the amplification regime via mode_defaults (large-kappa Binomial for bulk; small-kappa Beta-Binomial + ADO for sc).

The canonical home for the shared constructor parameters below: both bulkDNA and scDNA forward them here.

Parameters:

Name Type Description Default
breadth str

Capture breadth, one of "wgs" / "wes" / "panel". Sets the observed-locus set, the depth regime (mean per-locus coverage: wgs ~30x / wes ~120x / panel ~1500x; single-cell scales this down), and the dominant capture bias (wgs GC; wes per-target; panel per-amplicon).

"wgs"
target_genes all

Overrides the breadth's default locus set. A list/array selects exactly those loci; a float in (0, 1] a random fraction of loci; "all" defers to the breadth regime (wgs = all loci, wes ~30%, panel = 30 drivers). Seeded, so stable across batches.

"all"
data_mode str

Output mode. "counts" emits count-level results (coverage / alt-count / VAF / log2 ratio); "binary" additionally produces a post-ADO genotype call (single-cell only — bulk emits counts regardless).

"counts"
depth_model str

Per-locus depth-emission model: "dm" Dirichlet-multinomial (compositional, fixed budget — high-CN segments steal reads from the rest) or "nb" independent negative-binomial per locus (HMMcopy/CNVkit-style, no fixed-total coupling).

"dm"
n_reads int

Total read budget. Bulk uses it for the pooled library (default None -> derived as mu_depth × n_loci); single-cell ignores it (each cell's budget is set from mu_depth × n_loci).

None
seed int

RNG seed. Fixes the technical signature (GC->coverage curve, capture efficiency, per-batch depth shift, error rates, and — single-cell — ADO / doublets) and the cell/locus selection.

42
batch_label str

Batch/library/chip label; defaults to f"dnabatch{seed}".

None
fpr float

Legacy alias mapped to error_rate (per-base sequencing error) when error_rate is not otherwise supplied.

None
fnr float

Legacy parameter; accepted for signature parity but unused by the current model.

None
**hyper_overrides float

Any DNABatchHyperParams field may be overridden explicitly (e.g. mu_depth, kappa, ado_rate, beta_binom_conc, doublet_rate, gc_curve_sigma, capture_sigma, nb_dispersion, error_rate, depth_batch_sigma, ffpe_ct_rate). The breadth preset and the modality's mode_defaults set the starting values; see the subclasses for the bulk / single-cell defaults.

{}

Methods:

Name Description
mode_defaults

Amplification-regime defaults for this modality (overridden by subclasses).

mode_defaults

mode_defaults()

Amplification-regime defaults for this modality (overridden by subclasses).