writeVcf.Rd
Export gdb to vcf format.
By setting includeGeno = TRUE
, 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,
includeGeno = TRUE,
includeVarId = FALSE,
verbose = TRUE
)
Input gdb
.
Output file path.
Variants to include in output.
Samples to include in output.
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.
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