writeVcf.RdExport gdb to vcf format.
By setting includeGeno = FALSE, a sites-only vcf is created.
By setting includeVarId = TRUE, VAR_ids will be inserted into the ID field rather
than the original ID in the vcf. This can be useful when running external tools, such
as annotation software, and then upload the results back into the gdb, without
having to map the variants to VAR_ids again.
writeVcf(
object,
output,
VAR_id = NULL,
IID = NULL,
memlimit = 1000L,
includeGeno = TRUE,
includeVarId = FALSE,
overWrite = FALSE,
verbose = TRUE
)Input gdb.
Output file path.
Variants to include in output.
Samples to include in output.
Maximum number of records to process in a single batch. Defaults to 1000.
Can be reset to false if individual genotypes are not required in output.
Defaults to TRUE.
Include VAR_ids in the 'ID' field? Defaults to FALSE,
in which case the 'ID' field from the 'var' table is included.
Flag indicating whether output should be overwritten if it already exists.
Defaults to FALSE.
Should the method be verbose? Defaults to TRUE.
library(rvatData)
output <- tempfile()
gdb <- create_example_gdb()
writeVcf(gdb, VAR_id = 1:100, output = output)
#> No IID provided, all samples will be included in output vcf
#> 25000/25000 samples to be retained in output
#> 100 variants to be retained in output