convertVcfToGenoDoseWithBcftools: Convert VCF file to dosage file

convertVcfToGenoDoseWithBcftoolsR Documentation

Convert VCF file to dosage file

Description

Convert a VCF file to a genotype dosage file with bcftools +dosage and datamash. Caution, by default, if PL is 0,3,16 and GT=./., only PL will be used; if tag=GT is specified, then the output will contain -1, which will be converted into NA by readGenoDoseFileFromBcftools.

Usage

convertVcfToGenoDoseWithBcftools(
  in.vcf.file,
  out.txt.file,
  tag = NULL,
  save.timestamp = FALSE,
  nb.cores = 1
)

Arguments

in.vcf.file

path to the input VCF file (gzip-compressed)

out.txt.file

path to the output file (gzip-compressed)

tag

VCF tags to determine the dosage (PL/GL/GT); if NULL, chosen in that order

save.timestamp

if TRUE, the time stamp (and original name) will be saved, making the output file not bit-by-bit reproducible

nb.cores

number of threads for bcftools

Value

nothing

Author(s)

Timothee Flutre

See Also

readGenoDoseFileFromBcftools


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.