Description Usage Arguments Details Author(s) Examples
Convert the phase from the internally stored phase, ref and alt information
1 2 3 4 | phase2genotype(x, ...)
## S4 method for signature 'array'
phase2genotype(x, ref, alt, return.class = "matrix", ...)
|
x |
array see examples |
... |
pass on additional param |
ref |
reference allele vector |
alt |
alternative allele vector |
return.class |
'matrix' or 'array' |
To not introduce redundant information in the ASEset object, the genotype matrix is accessed from the phase matrix, which together with ref and alt allele information contains the same information(not taken into account three-allelic or more SNPs).
The genotype matrix retrieved from an ASEset object can differ from the genotype matrix stored in the object if reference and alternative alleles were not used or has changed since the phase genotype matrix was stored. Basically, it is preferable to provide reference and alternative information when storing the genotype matrix.
If possible, it is better to not use a genotype matrix, but instead relying completely on storing a phase matrix(or array) together with reference and alternative allele information.
Jesper R. Gadin, Lasse Folkersen
1 2 3 4 5 6 7 8 | #load example data
data(ASEset)
data(genomatrix)
p <- genotype2phase(genomatrix, ref(ASEset), return.class="array")
ref <- ref(ASEset)
alt <- inferAltAllele(ASEset)
gt <- phase2genotype(p, ref, alt, return.class="matrix")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.