Skip to contents

The input is an auditable evidence relation. Every row names its CNV, deletion/gain context, criterion, numeric score, source, source release, and evidence record. Repeated case evidence is capped by the published criterion group maximum/minimum. Evidence selection remains explicit and is never inferred from free text or phenotype similarity by this function. Contracts are resolved independently for each (cnv_id, cnv_type). Evidence and group rows retain contributing source identities and linked evidence counts; the summary provider is the XCNV ACMG/ClinGen policy kernel. Only supported status emits a clinical classification. Identifier, provenance, and contract labels must be character or factor labels (never logical, numeric, list, or matrix values) and required values must be non-missing and nonempty on every row. If supplied, policy_id must be nonempty and equal the native ACMG/ClinGen policy identity on every row; foreign or mixed policies are rejected rather than reinterpreted. A scalar evidence model_id comes only from selected evidence that contributes to the output grain: its group, or the CNV/type summary score. It is emitted only when every such row has the same nonmissing model; unselected rows never supply it. Distinct nonmissing selected model identities for one CNV/type are rejected. Provider identity remains evidence provenance and is neither a voting input nor rewritten.

Usage

score_cnv_2019(evidence, detail = c("summary", "groups"))

Arguments

evidence

Data frame with character/factor, non-missing, nonempty cnv_id, cnv_type, criterion, source_id, source_release, and evidence_id, plus a finite numeric score. Numeric character and factor score labels are parsed by label, never by factor code. Optional logical selected defaults to TRUE. Optional contract columns include provider_id, assembly, model_id, policy_id, and status; supplied label columns must be character/factor (with missing assembly and model_id allowed), provider_id must be nonempty on every row, and policy_id must be "acmg-clingen-2019-constitutional-cnv" on every row.

detail

"summary" for one row per CNV or "groups" for the capped criterion-group audit relation.

Value

A data frame. Summary rows include policy status and linked evidence counts/identities without treating provenance as scoring input.