gt_as_vcf: Convert a 'gen_tibble' to a VCF

View source: R/gt_as_vcf.R

gt_as_vcfR Documentation

Convert a gen_tibble to a VCF

Description

This function write a VCF from a gen_tibble.

Usage

gt_as_vcf(x, file = NULL, chunk_size = NULL, overwrite = FALSE)

Arguments

x

a gen_tibble, with population coded as 'population'

file

the .vcf file name with a path, or NULL (the default) to use the location of the backing files.

chunk_size

the number of loci processed at a time. Automatically set if left to NULL

overwrite

logical, should the file be overwritten if it already exists?

Value

the path of the .vcf file

Examples

example_gt <- load_example_gt("gen_tbl")

# Write a vcf file
example_gt %>% gt_as_vcf()

tidypopgen documentation built on Aug. 28, 2025, 1:08 a.m.