Skip to content

iscc.data.bulkDNA

bulkDNA(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: DNA

Bulk DNA-seq: pool the sampled cells, high read budget, large-kappa compositional depth, Binomial allele layer.

Coverage at a locus ∝ the POOLED total copy number (Σ_c CN_cl) × per-locus efficiency, so amplified segments draw proportionally more reads, and at a fixed budget compositionally reduce the coverage of others (the DM coupling). The pooled true alt fraction is the copy-number-weighted mean of the per-cell VAFs.

Takes no constructor parameters of its own: it pools every sampled cell (there is no n_cells). The bulk mode_defaults set a large-kappa amplification regime (kappa=2000 ≈ un-amplified multinomial/Poisson) and leave the single-cell allele knobs inert (ado_rate=0, doublet_rate=0).

After run, purity holds the pool's TRUE tumour purity (the fraction of pooled cells that are cancer cells, None when the sample carries no cell types) and n_cells_pooled its size. Purity is what turns an observed VAF into a cancer-cell fraction, so it is both an input to that calculation and the answer key for any method that estimates purity from the data.

See DNA for the constructor parameters.

Methods:

Name Description
run

Assay a pooled bulk-DNA sample from the sampled cells.

to_anndata

One 'pseudobulk sample' observation × loci (var) AnnData (X = coverage).

run

run(cell_data, cell_subset=None, germline_sites=None, **kwargs)

Assay a pooled bulk-DNA sample from the sampled cells.

Pools the selected cells into a single bulk library and emits, per locus, the read depth, alternate-allele counts, VAF, and a GC/mappability-corrected copy-number log2 ratio.

Parameters:

Name Type Description Default
cell_data dict

Per-cell ground-truth tables from the sampling stage; uses the SNV table cell_snv and the copy-number ground truth. The cell-type table, when present, gives the true tumour purity of the pool.

required
cell_subset array-like of cell IDs

Restrict the pool to these cells. By default every sampled cell is pooled.

None
germline_sites optional

Which loci carry an INHERITED (germline) variant rather than a somatic one. A boolean mask over all loci or over the assayed loci, a boolean pandas.Series indexed by locus name, a collection of locus names, or a collection of integer locus positions. Supplied, it adds an is_germline column to observed_data; omitted, no such column is produced. Falls back to cell_data["germline_sites"] when the sample carries that ground truth.

None

Returns:

Type Description
bulkDNA

self, with the per-locus results in observed_data, the pool's true tumour purity in purity and its size in n_cells_pooled. Call to_anndata or write to export.

to_anndata

to_anndata()

One 'pseudobulk sample' observation × loci (var) AnnData (X = coverage).

Technology presets

Bulk DNA sequencing differs by capture breadth — set breadth:

Assay breadth Depth (mu_depth) Loci Dominant capture bias
Whole-genome (WGS) "wgs" ~30× all GC curve
Whole-exome (WES) "wes" ~120× exome (~30% of loci) per-target
Targeted panel "panel" ~1500× a small gene panel per-amplicon