Write a vcf file (file format version 4.3, see details below) from a tidy data frame. Used internally in radiator and might be of interest for users.
write_vcf(
data,
pop.info = FALSE,
filename = NULL,
source = NULL,
empty = FALSE
)
A tidy data frame object in the global environment or
a tidy data frame in wide or long format in the working directory.
How to get a tidy data frame ?
Look into radiator tidy_genomic_data
.
(optional, logical) Should the population information be
included in the FORMAT field (along the GT info for each samples ?). To make
the VCF population-ready use pop.info = TRUE
. The population information
must be included in the POP_ID
column of the tidy dataset.
Default: pop.info = FALSE
. Experimental.
(optional) The file name prefix for the vcf file
written to the working directory. With default: filename = NULL
,
the date and time is appended to radiator_vcf_file_
.
source of vcf
generate an empty vcf
VCF file format version:
If you need a different file format version than the current one, just change the version inside the newly created VCF, that should do the trick. For more information on Variant Call Format specifications.
Danecek P, Auton A, Abecasis G et al. (2011) The variant call format and VCFtools. Bioinformatics, 27, 2156-2158.