View source: R/powerDetectSomatic.R
calculatePowerDetectSomatic | R Documentation |
This function calculates the probability of correctly rejecting the null hypothesis that an alt allele is a sequencing error rather than a true (mono-)clonal mutation.
calculatePowerDetectSomatic(
coverage,
f = NULL,
purity = NULL,
ploidy = NULL,
cell.fraction = 1,
error = 0.001,
fpr = 5e-07,
verbose = TRUE
)
coverage |
Mean sequencing coverage. |
f |
Mean expected allelic fraction. If |
purity |
Purity of sample. Only required when |
ploidy |
Ploidy of sample. Only required when |
cell.fraction |
Fraction of cells harboring mutation. Ignored if
|
error |
Estimated sequencing error rate. |
fpr |
Required false positive rate for mutation vs. sequencing error. |
verbose |
Verbose output. |
A list with elements
power |
Power to detect somatic mutations. |
k |
Minimum number of supporting reads. |
f |
Expected allelic fraction. |
Markus Riester
Carter et al. (2012), Absolute quantification of somatic DNA alterations in human cancer. Nature Biotechnology.
purity <- c(0.1, 0.15, 0.2, 0.25, 0.4, 0.6, 1)
coverage <- seq(5, 35, 1)
power <- lapply(purity, function(p) sapply(coverage, function(cv)
calculatePowerDetectSomatic(coverage = cv, purity = p, ploidy = 2,
verbose = FALSE)$power))
# Figure S7b in Carter et al.
plot(coverage, power[[1]], col = 1, xlab = "Sequence coverage",
ylab = "Detection power", ylim = c(0, 1), type = "l")
for (i in 2:length(power)) lines(coverage, power[[i]], col = i)
abline(h = 0.8, lty = 2, col = "grey")
legend("bottomright", legend = paste("Purity", purity),
fill = seq_along(purity))
# Figure S7c in Carter et al.
coverage <- seq(5, 350, 1)
power <- lapply(purity, function(p) sapply(coverage, function(cv)
calculatePowerDetectSomatic(coverage = cv, purity = p, ploidy = 2,
cell.fraction = 0.2, verbose = FALSE)$power))
plot(coverage, power[[1]], col = 1, xlab = "Sequence coverage",
ylab = "Detection power", ylim = c(0, 1), type = "l")
for (i in 2:length(power)) lines(coverage, power[[i]], col = i)
abline(h = 0.8, lty = 2, col = "grey")
legend("bottomright", legend = paste("Purity", purity),
fill = seq_along(purity))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.