dt_to_vcf: data.table to VCF

View source: R/dt_to_vcf.R

dt_to_vcfR Documentation

data.table to VCF

Description

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

save_path <- echotabix::dt_to_vcf(dat=echodata::BST1)

RajLabMSSM/echotabix documentation built on Nov. 21, 2023, 8:02 a.m.