phaseArray2phaseMatrix {AllelicImbalance} | R Documentation

## phaseArray2phaseMatrix

### Description

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

### Usage

    phaseArray2phaseMatrix(x, ...)

    ## S4 method for signature 'array'
    phaseArray2phaseMatrix(x, ...)

### Arguments

`x` | array see examples
`...` | arguments to forward to internal functions

### Details

A more effectice way of store the phase data in the ASEset object

### Author(s)

Jesper R. Gadin, Lasse Folkersen

### Examples

    #load data
    data(ASEset)
    a <- ASEset

    #example phase matrix
    p1 <- matrix(sample(c(1,0),replace=TRUE, size=nrow(a)*ncol(a)),nrow=nrow(a), ncol(a))
    p2 <- matrix(sample(c(1,0),replace=TRUE, size=nrow(a)*ncol(a)),nrow=nrow(a), ncol(a))
    p <- matrix(paste(p1,sample(c("|","|","/"), size=nrow(a)*ncol(a), replace=TRUE), p2, sep=""),
    	nrow=nrow(a), ncol(a))

    ar <- phaseMatrix2Array(p)

    #Convert back
    mat <- phaseArray2phaseMatrix(ar)

[Package AllelicImbalance version 1.20.0 Index]