Convert a data.table to a VCF file
Used to be performed with
bcftools convert, but MungeSumstats works much better.
WARNING: This method only works for a
data.table with a single sample.
It cannot parse multiple pieces of information stored in the same column.
Usage
dt_to_vcf(
dat,
save_path = tempfile(fileext = "_converted.vcf"),
tabix_index = FALSE,
nThread = 1,
...
)Arguments
- dat
data.frame to convert to VCF file.
- save_path
File path to save formatted data. Defaults to
tempfile(fileext=".tsv.gz").- tabix_index
Index the formatted summary statistics with tabix for fast querying.
- nThread
The number of threads to use. Experiment to see what works best for your data on your hardware.
- ...
Additional arguments passed to standardise_header.
Examples
if (FALSE) { # \dontrun{
save_path <- echotabix::dt_to_vcf(dat=echodata::BST1)
} # }