domains / families / science / vcf-manipulation

vcf-manipulation

combined

Combine, split, sort, intersect, and subset VCF/BCF files with bcftools merge, concat, isec, sort, view, and reheader. Use when merging different samples into a cohort VCF, concatenating per-chromosome or per-region call sets for the same samples, intersecting or complementing call sets from different callers, subsetting samples/regions, harmonizing sample names and ##contig headers, or recomputing AC/AN/AF after subsetting. Covers the normalize-before-combine rule, the single-sample-merge 0/0-fabrication trap (merge is not joint genotyping), merge vs concat vs isec selection, and the --naive concat and -R-vs-T region caveats. Not for structural-variant merging by breakpoint fuzz (see variant-calling/structural-variant-calling) or joint genotyping of gVCFs (see variant-calling/joint-calling).

When to use

Skill page

Conflict

The two copies cover the same bcftools operations but differ in scope and critical constraints. The first copy is a concise command reference for merge, concat, sort, isec, and subsetting. The second copy is a more rigorous guide that adds version compatibility checks, a mandatory normalization step before combining, a detailed decision matrix for merge vs concat vs isec, and a specific warning that bcftools merge is not joint genotyping (the 0/0 fabrication trap). Because the second copy contains material steps and constraints (normalization, version checks, merge trap) that the first lacks, and the first provides a cleaner quick-reference structure, crowning one would hide the other's valuable procedural safeguards.