View source: R/adjustLogRatio.R
adjustLogRatio | R Documentation |
This function can be used to adjust the log ratio for tumor purity and ploidy for downstream tools that expect a log2 ratio (for example GISTIC).
adjustLogRatio(ratio, purity, ploidy, is.log2 = TRUE, min.ratio = 2^-8)
ratio |
Vector of log2 tumor vs normal coverage ratios. |
purity |
Purity of sample. |
ploidy |
Ploidy of sample. |
is.log2 |
|
min.ratio |
Minimum (non-log2-transformed) ratio. Set to approx -8
|
numeric(length(log.ratio))
, log.ratio
adjusted
for purity
and ploidy
Markus Riester
Nature Biotechnology. * Toal (2018), https://github.com/lima1/PureCN/issues/40
normal.coverage.file <- system.file("extdata", "example_normal.txt.gz",
package = "PureCN")
tumor.coverage.file <- system.file("extdata", "example_tumor.txt.gz",
package = "PureCN")
normal <- readCoverageFile(normal.coverage.file)
tumor <- readCoverageFile(tumor.coverage.file)
log.ratio <- calculateLogRatio(normal, tumor)
log.ratio.adjusted <- adjustLogRatio(log.ratio, 0.65, 1.73)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.