randomRef {AllelicImbalance} | R Documentation

## Random ref allele from genotype

### Description

Create a vector of random reference alleles

### Usage

    randomRef(x, ...)

    ## S4 method for signature 'ASEset'
    randomRef(x, source = "alleleCounts", ...)

### Arguments

`x` | `ASEset` object
`...` | internal arguments
`source` | 'alleleCounts'

### Details

Randomly shuffles which of the two alleles for each genotype that is indicated as reference allele, based on either allele count information or previous ref and alt alleles.

When the source is 'alleleCounts', the two most expressed alleles are taken as reference and alternative allele.

### Author(s)

Jesper R. Gadin, Lasse Folkersen

### Examples

    #load example data
    data(ASEset.sim)
    a <- ASEset.sim

    ref(a) <- randomRef(a, source = 'alleleCounts')

[Package AllelicImbalance version 1.25.2 Index]