phase2genotype: phase2genotype

Description Usage Arguments Details Author(s) Examples

Description

Convert the phase from the internally stored phase, ref and alt information

Usage

1
2
3
4
phase2genotype(x, ...)

## S4 method for signature 'array'
phase2genotype(x, ref, alt, return.class = "matrix", ...)

Arguments

x

array see examples

...

pass on additional param

ref

reference allele vector

alt

alternative allele vector

return.class

'matrix' or 'array'

Details

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.

Author(s)

Jesper R. Gadin, Lasse Folkersen

Examples

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")

AllelicImbalance documentation built on Nov. 8, 2020, 6:52 p.m.