Check a VCF for common variant-level problems and remove the offenders
Source:R/discarded_variants.R
check_and_remove_discarded_variants.RdRemoves:
Rows with identical REF and ALT.
Stray
#CHROMheader repeats.Duplicated (CHROM, POS, REF, ALT) rows (keeping one copy).
Multiple-ALT rows (comma-separated ALT field).
Non-standard chromosome names (or those outside
chr_names_to_processwhen supplied).Substitutions of length > 2 (e.g.
ACT>TGA).Complex indels (
REF[1] != ALT[1]).Wrong DBS rows where REF and ALT share a base at the same position.
Variants whose REF base is not in
{A, C, G, T}.