Import the official ClinVar flat reports as one tidy table
Source:R/flat.R
rclinvarbitration_import_flat.RdJoins variant_summary and submission_summary directly in DuckDB. The
resulting clinvar table has one scalar row per variation, allele, assembly
location, decision, SCV submission, RCV accession, or allele-gene link,
identified by record_kind. It is the same canonical table used by
rclinvarbitration_import_xml().
Location rows retain source coordinates even when ClinVar does not provide a
complete VCF tuple (for example some CNVs). clinvar_vcf contains only
locations with a usable one-based position and non-missing REF/ALT.
Arguments
- con
A DuckDB DBI connection.
- submission_path
Official
submission_summary*.txt.gz.- variant_path
Official
variant_summary*.txt.gz.- release_id
Immutable source-release label stored with the imported rows and returned in the import receipt.
- parquet_path
Optional new Parquet path for the same tidy table. The returned import receipt can be passed directly to
rclinvarbitration_publish_ducklake().- assembly
One or both of
"GRCh38"and"GRCh37". Both are imported by default; policy decisions are computed once, preferring GRCh38 as the coordinate source when both are present.- profile_id
Policy profile recorded on decision rows.
- submitter_exclusions
Submitters excluded from the policy decision.