Compute variant-to-tree precision/recall/F1 curve across confidence cutoffs
Source:R/diagnostics.R
compute_variant_pr_curve.RdConstruct a variant VAF matrix from long-format mutation counts, compare variant partitions against tree clades using Jaccard similarity, and sweep node-confidence cutoffs to summarize precision, recall, and F1.
Usage
compute_variant_pr_curve(
phy_annot,
mut_dat,
min_vaf = 0.01,
min_cells = 2,
j_thres = 0.66,
n_points = 50,
ncores = 1
)Arguments
- phy_annot
A rooted
phyloobject with clade confidence stored innode.label.- mut_dat
Long-format mutation table containing at least columns
cell,variant,a, andd.- min_vaf
Minimum VAF used when defining variant-positive cells (default
0.01).- min_cells
Minimum number of variant-positive cells required for a variant to be evaluated (default
2).- j_thres
Jaccard threshold for declaring a match between a variant split and a tree clade (default
0.66).- n_points
Number of confidence cutoffs to evaluate (default
50).- ncores
Number of cores for sweeping confidence cutoffs. Uses
parallel::mclapplywhenncores > 1on non-Windows systems.