duplicateDiscordanceProbability {GWASTools} | R Documentation

## Probability of duplicate discordance

### Description

`duplicateDiscordanceProbability` calculates the probability of observing discordant genotypes for duplicate samples.

### Usage

    duplicateDiscordanceProbability(npair,
                                    error.rate = c(1e-5, 1e-4, 1e-3, 1e-2),
                                    max.disc = 7)

### Arguments

`npair` | The number of pairs of duplicate samples.
`error.rate` | A numeric vector of error rates (i.e., the rate at which a genotype will be called incorrectly).
`max.disc` | The maximum number of discordances for which to compute the probability.

### Details

Since there are three possible genotypes, one call is correct and the other two are erroneous, so theoretically there are two error rates, a and b. The probability that duplicate genotyping instances of the same subject will give a discordant genotype is 2[(1 - a - b)(a + b) + ab]. When a and b are very small, this is approximately 2(a + b) or twice the total error rate. This function assumes that a == b, and the argument `error.rate` is the total error rate a + b.

Any negative values for the probability (due to precision problems for very small numbers) are set to 0.

### Value

This function returns a matrix of probabilities, where the column names are error rates and the row names are expected number of discordant genotypes (>0 through >`max.disc`).

### Author(s)

Cathy Laurie

### See Also

`duplicateDiscordance`, `duplicateDiscordanceAcrossDatasets`

### Examples

    disc <- duplicateDiscordanceProbability(npair=10, error.rate=c(1e-6, 1e-4))

    #probability of observing >0 discordant genotypes given an error rate 1e-6
    disc[1,1]

    #probability of observing >1 discordant genotypes given an error rate 1e-4
    disc[2,2]

[Package GWASTools version 1.40.0 Index]