genotype2phase: genotype2phase

Description Usage Arguments Details Author(s) Examples

Description

used to convert the genomatrix from the visually friendly matrix to phase array.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
genotype2phase(x, ...)

## S4 method for signature 'matrix'
genotype2phase(
  x,
  ref = NULL,
  return.class = "array",
  levels = c("A", "C", "G", "T"),
  ...
)

Arguments

x

matrix see examples

...

pass on additional param

ref

reference alleles

return.class

'array' or 'list'

levels

vector of expected alleles

Details

To not introduce redundant information in the ASEset object, the genotype matrix is translated to a phase matrix, containing the same information. Does not allow tri-allelic or multi-allelic SNPs, and if present the multi-allelic SNPs will lose the least occuring genotype.

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.

Author(s)

Jesper R. Gadin, Lasse Folkersen

Examples

1
2
3
4

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