Skip to contents

Aligns ancestry replicates across label permutations and calculates mean and median Q matrices, variance, standard deviation, empirical confidence intervals, cluster stability, sample uncertainty, alignment diagnostics, and a global stability score. All replicates must use the same backend, K, sample identifiers, and sample order.

Usage

consensus_ancestry(x, confidence = 0.95, reference_replicate = NULL,
  tolerance = 1e-06)

validate_ancestry_consensus(x, tolerance = 1e-06)

ancestry_consensus_table(x)

Arguments

x

A PopgenVCFAncestryResult, a list of canonical ancestry replicates, or a PopgenVCFAncestryConsensus for validation and table conversion.

confidence

Confidence level used for empirical per-cell ancestry intervals.

reference_replicate

Optional replicate identifier used as the alignment reference. The smallest replicate identifier is used by default.

tolerance

Numerical tolerance for ancestry validation, alignment, and simplex checks.

Value

consensus_ancestry() returns a validated PopgenVCFAncestryConsensus. The validator returns its input invisibly. ancestry_consensus_table() returns a long-form data.table.