updatebd: Update a binary dosage file to Format 5

View source: R/convert.R

updatebdR Documentation

Update a binary dosage file to Format 5

Description

Reads a binary dosage file in format 1, 2, 3, or 4, detects the format automatically, and converts it to a Format 5 file pair by calling the appropriate conversion routine. If the source file does not contain genotype probabilities, those values are stored as missing in the output.

Usage

updatebd(bdfiles, bdose_file)

Arguments

bdfiles

Vector of file names for the binary dosage file. Format 4 files require one file name. Formats 1, 2, and 3 require three file names: the binary dosage file, the family file, and the map file.

bdose_file

Path for the output .bdose file. The companion .bdi metadata file is written to paste0(bdose_file, ".bdi").

Value

NULL (invisibly)

Examples

vcf1afile <- system.file("extdata", "set1a.vcf", package = "BinaryDosage")
bdfile <- tempfile()
suppressWarnings(
  vcftobdlegacy(vcffiles = vcf1afile,
                bdfiles = bdfile,
                format = 4L)
)
bdose_file <- tempfile(fileext = ".bdose")
updatebd(bdfiles    = bdfile,
         bdose_file = bdose_file)

BinaryDosage documentation built on April 30, 2026, 1:09 a.m.