| mergebd | R Documentation |
Merges two or more Format 5 binary dosage files into a single Format 5 output file. The merge type is determined automatically:
mergebd(bdose_files, bdose_file)
bdose_files |
Character vector of paths to the input .bdose files.
Must contain at least two entries. The companion .bdi file for each is
expected at |
bdose_file |
Path for the output .bdose file. The companion .bdi
metadata file is written to |
If subject IDs do not overlap across files, a subject merge is performed: the output contains all subjects from every file and the SNPs common to all files.
If SNP IDs do not overlap across files, a SNP merge is performed: the output contains all SNPs from every file and the subjects common to all files.
If both subject IDs and SNP IDs overlap across files the merge cannot be performed and an error is returned.
SNPs are identified by chromosome, position, reference allele, and alternate allele.
NULL (invisibly)
bdfile <- system.file("extdata", "vcf1a.bdose", package = "BinaryDosage")
bdinfo_src <- getbdinfo(bdfile)
# Create two format 5 files with non-overlapping subjects
bdose_a <- tempfile(fileext = ".bdose")
bdose_b <- tempfile(fileext = ".bdose")
bdose_tmp <- tempfile(fileext = ".bdose")
updatebd(bdfiles = bdfile, bdose_file = bdose_tmp)
subsetbd(bdfiles = bdose_tmp,
bdose_file = bdose_a,
subjectids = bdinfo_src$samples$sid[1:30])
subsetbd(bdfiles = bdose_tmp,
bdose_file = bdose_b,
subjectids = bdinfo_src$samples$sid[31:60])
bdose_out <- tempfile(fileext = ".bdose")
mergebd(bdose_files = c(bdose_a, bdose_b),
bdose_file = bdose_out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.