
genotype2phase(x, ...)
"genotype2phase"(x, ref = NULL, return.class = "array", levels = c("A", "C", "G", "T"), ...)
This function can handle indels, but if the reference allele is not provided, the rank matrix which is temporary created might use lots of memory, depending on the amount of indels among the genotypes. As conclusion, it is preferable to send in reference genome when converting to phase.
levels information is only important if the reference allele has to be guessed, and so if reference information is provided, the levels argument can be ignored.
#load example data
data(genomatrix)
data(ASEset)
p <- genotype2phase(genomatrix, ref(ASEset))
Run the code above in your browser using DataLab