Skip to content

Creating an initial variant list #52

Closed

Description

@tomwhite

We now have a normalise function to pad out a VCZ with variants from another VCZ that contains the total list of variants (see #30, #42).

How can we create the VCZ with the list of variants? One way would be to use bcftools merge with VCF files that contain different variants (e.g. for different genotype arrays) to get the union of them, then converting to VCZ.

However, this doesn't work in general since bcftools doesn't handle sites with multiple records in a way that keeps the ordering consistent, which is a requirement for Zarr. I've explored this in detail in the repo at https://github.com/tomwhite/vcf-merge-stable, but the gist is that bcftools merge -m none (which won't create any new multiallelic records) can create a variant list that has a different order the input VCFs.

The tool in https://github.com/tomwhite/vcf-merge-stable can create merged VCFs with the desired ordering, as a replacement for bcftools. But we might consider doing the same thing in vczstore. Perhaps something like

vczstore create vcz1 vcz2 ...

to create an empty store with the union of the variants in vcz1, vcz2, etc.

Activity

  1. jeromekelleher commented on Apr 24, 2026

    @jeromekelleher
    Member

    It's probably better to have an explicit create command all right, as we'll want to get various properties there which might not naturally come through with any of the data chunks we want to append.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions