Full loop: split_votes() (discovery / test halves) -> clone feature matrix (discovery half, re-oriented by the
all-cell pseudobulk) -> discover_clones() -> merge_clones() (test half) -> global EM round -> within-trunk
discovery (discover_within()) -> clone_profiles() -> fit_clone_states() -> segment_clone() -> doublet clones ->
assign_cells() (em_rounds hard-EM rounds: the clone states are re-profiled on the members of the previous round,
the singlets with posterior >= member_post; clones left with fewer than min_size members leave the member set; the
assignment's clone is every cell's likelihood-best clone, confident = posterior >= min_post and not
doublet-like) ->
clean_reference() -> optional depth re-pass relative to the clean pool -> per-cell calls. Each cell
inherits its clone's non-neutral segments (source = "inherited") and is confirmed when its own
score under the clone state (depth + allele LLR vs neutral; allele term two-sided, or one-sided on the clone-oriented
votes with opts$confirm_sided = "one") is above the threshold of the tumour null:
reference-pool cells x all pieces + all cells x control pieces, scored as the best of the loss / gain /
CN-LOH / amp states (type-7 null_q quantile per stratum, strict >; pooled over strata below
min_null_rows).
Usage
caller_tumour(
feat,
params = caller_defaults(),
multiplets = NULL,
control_regions = NULL,
opts = clone_defaults(),
verbose = TRUE
)Arguments
- feat
scn_features list
- params
- multiplets
optional data.table cell, prob (
multiplet_table()); cells aboveopts$multiplet_probare excluded from discovery and pseudobulks but assigned and flagged- control_regions
optional user control regions (regions table) replacing the automatic ones (of the confirmation null and of the reference cleaning,
clean_reference())- opts
tumour-mode options (
clone_defaults())- verbose
log progress
Value
scphasedcn (mode tumour) with clones, assignments, segments, profiles, calls (plus extra:
intermediate results in null_fit$clones)
Details
Input feat (the feature step's scn_features, or an equivalent list): features (long table),
regions, votes, atoms, cells (data.table with cell, in vote index order; n_frag / stratum),
win (1 Mb window depth: list(windows, x, e) with windows x cells matrices, or a long table cell, chrom,
start, end, x, e) and null_fit (list with tpar = fit_depth_null() table and rho).