splitGenotypes: Split genotype columns into allele columns
Description
Converts a matrix or data frame with one genotype column per marker into a matrix with
two allele columns per marker. Malformed genotypes give an error.
A matrix with twice as many columns as x, preserving row names. Missing
alleles are represented by missing, except for completely missing input, which
returns a matrix of zeroes.
Arguments
x
A matrix or data frame containing genotypes.
sep
Allele separator. If NULL, detected automatically from the first 50
non-missing genotypes, trying "/", ",", "-", ";" and " ".
missing
Symbol for missing alleles (default 0).
clean
If TRUE, trim whitespace and fill in missing individual alleles, e.g. "1/"
becomes "1/0". Default FALSE for speed.
colNames
If TRUE, append .1 and .2 to the input column names. If FALSE
(default), columns are unnamed.