Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/duplicateDiscordanceProbability.R
duplicateDiscordanceProbability
calculates the probability of
observing discordant genotypes for duplicate samples.
1 2 3 | duplicateDiscordanceProbability(npair,
error.rate = c(1e-5, 1e-4, 1e-3, 1e-2),
max.disc = 7)
|
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. |
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.
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
).
Cathy Laurie
duplicateDiscordance
,
duplicateDiscordanceAcrossDatasets
1 2 3 4 5 6 7 | 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]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.