purify | R Documentation |
Given x with rows and columns, and purity estimates for each column,
purifyBetas
takes (squeezed) logits of assay(x), divides by purity
to push values towards the extremes, and then takes (de-squeezed)
expits to put the purified values back on a 0-1 scale.
purify(x, purity, sqz = 1e-06, betas = TRUE)
x |
a SummarizedExperiment-like object, or a matrix of values |
purity |
a vector of estimated purities ( |
sqz |
a squeeze factor to avoid +/-Inf values in |
betas |
are the values of assay(x) between 0 and 1? (default is TRUE) |
purify
is even dumber and simply divides each assays(x) by purity,
unless the argument betas
is TRUE (the default), in which case it
calls purifyBetas
instead. (This is a methylation-centric package,
although VAFs can be treated the same way, hence the default setting.)
If you pass `purity` estimates of 0, you'll get an error. If `x` is a GenomicRatioSet, only assays(x)$Beta is purified. No attempt is made to preserve imprinting or any such thing, although the tendency of imprinted regions to fall near zero on a logit scale, and the fact that zero times anything is still zero, does incidentally encourage this. However, any resemblance to biological sanity is purely coincidental.
whatever `x` is (matrix or SE), purified (see Details)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.