testForAllelicBiases {SNPhood} | R Documentation

## Perform an allelic bias tests for each user region and bin.

### Description

`testForAllelicBiases` performs tests for allelic biases for each binned user region using binomial tests. For the parameter `readGroups`, the name of exactly two read groups must be provided for which allelic ratio tests should be performed. See the Vignette for more details.

### Usage

    testForAllelicBiases(SNPhood.o, readGroups, confLevel = 0.95,
      nullHypothesisFraction = 0.5, calcBackgroundDistr = TRUE,
      nRepetitions = 100, pValuesToTestBackground = c(1e-04, 5e-04, 0.001,
      0.005, seq(0.01, 1, 0.01)), verbose = TRUE)

### Arguments

`SNPhood.o` | Object of class `SNPhood`
`readGroups` | Character or NULL. Default NULL. Read groups that should be plotted, specified by their name as obtained by the function `annotationReadGroups`). If set to NULL, all read groups will be considered.
`confLevel` | Numeric(1). Default 0.95. The confidence level for estimating the confidence intervals. Must be between 0 and 1.
`nullHypothesisFraction` | Numeric(1). Default 0.5. The expected probability under the null hypothesis of not having any bias. Must be between 0 and 1.
`calcBackgroundDistr` | Logical(1). Default `TRUE`. Should the background distribution be calculated? Note that this can be usually very time-consuming.
`nRepetitions` | Integer(1). Default 10. Number of repetitions for calculating the background distribution. Only relevant if `calcBackgroundDistr` is set to `TRUE`
`pValuesToTestBackground` | Numeric. Default c(0.0001, 0.0005, 0.001, 0.005, seq(0.01,1,0.01)). Set of p-values for which corresponding FDR values will be computed
`verbose` | Logical(1). Default TRUE. Should the verbose mode (i.e., diagnostic messages during execution of the script) be enabled?

### Value

Object of class `SNPhood` with all the data from the allelic bias test stored in the slot `additionalResults`, which can be easily retrieved via the accessor function `results`. See the help pages of the result function (?results) or the vignette for details.

### Examples

    data(SNPhood.o, package="SNPhood")
    ## Perform the test without calculating the background distribution
    SNPhood.o = testForAllelicBiases (SNPhood.o, readGroups = c("paternal","maternal"))
    str(results(SNPhood.o, type="allelicBias"), list.len = 8)
    ## Check the parameters
    results(SNPhood.o, type="allelicBias", elements = "parameters")

[Package SNPhood version 1.10.0 Index]