View source: R/SeparateBackground.R
SeparateSignatureFromBackground | R Documentation |
We index mutation channels (e.g. ACA > AAA, ACC > AAC, ...
) by j, j \in 1...96.
We index input mutational spectra by i.
Let
g = g_1, g_2,… , g_{96}, with Σ g_j = 1, be the previously determined, input background signature profile,
s^i, i \in 1, 2,… be the input spectra, from exposed samples, usually only 2 or 3,
b^i, i \in 1, 2,… be the (to-be-estimated) numbers of mutations due to the background signature in each s^i, and
t = t_1, t_2,… , t_{96}, with Σ t_j = 1, be the (to-be-estimated) target signature due to an exposure.
We want to maximize Π^iP(s^i|b^i,t)P(b^i) over b^1, b^2,… and t. (Note that the code actually minimizes the additive inverse of this.)
P(b^i) is estimated from the distribution of previously observed numbers of mutations in untreated samples, with the additional constraint that b^i ≤ |s^i|), where |s^i| is defined as the total number of mutations in spectrum s^i, i.e. |s^i| = Σ_j s^i_j, j \in 1...96.
P(s^i|b^i,t) is estimated as follows:
The expected number of mutations in each mutation category, j, is estimated as
e^i_j = g_jb^i + t_j(|s^i| - b^i).
Then P(s^i|e^i) is estimated as Π_jP(s^i_j|e^i_j).
P(s^i_j|e^i_j) is estimated from a negative binomial distribution
centered on each e^i_j; see the sig.nbinom.size
elements of
the background.info
package variables.
SeparateSignatureFromBackground( spectra, bg.sig.info, m.opts = NULL, start.b.fraction = 0.1 )
spectra |
The spectra from which to subtract the background,
as a matrix or |
bg.sig.info |
Information about the background signature. See
|
m.opts |
Options to pass to |
start.b.fraction |
The estimated fraction of the mutations in
|
See ObjFn1
.
A list with the elements
inferred.target.sig
The estimated target signature as a numerical vector.
The estimated total number of mutations due to the target signature in each input spectrum.
exposures.to.bg.sig
The estimated total number of mutations due to the background in each input spectrum.
message
The message
element of all.opt.ret
.
all.opt.ret
The entire return value from the optimization.
See nloptr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.