% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert.R
\name{updatebd}
\alias{updatebd}
\title{Update a binary dosage file to Format 5}
\usage{
updatebd(bdfiles, bdose_file)
}
\arguments{
\item{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.}

\item{bdose_file}{Path for the output .bdose file. The companion .bdi
metadata file is written to \code{paste0(bdose_file, ".bdi")}.}
}
\value{
NULL (invisibly)
}
\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.
}
\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)
}
