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
)

Arguments

data

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.

pop.info

(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.

filename

(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

source of vcf

empty

generate an empty vcf

Details

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.

References

Danecek P, Auton A, Abecasis G et al. (2011) The variant call format and VCFtools. Bioinformatics, 27, 2156-2158.

Author

Thierry Gosselin thierrygosselin@icloud.com