View source: R/function_sampleX.R
sample_random_X | R Documentation |
The loss-function learning digital tissue deconvolution approach published
by Goertler et al 2018 estimates cell compositions for a given reference
matrix X (supervised deconvolution).
Basically, there are two methods to specify the reference profiles in X.
Either they are selected using external knowledge (e.g. additional
measurements) or they are randomly selected out of the complete data set.
The sample_random_X function is an implementation for the second method.
sample_random_X( included.in.X, pheno, expr.data, percentage.of.all.cells = 0.1, normalize.to.count = TRUE )
included.in.X |
vector of strings, indicating types that will be in the reference matrix |
pheno |
named vector of strings, with pheno information ('pheno') for each sample in 'expr.data'. names(pheno)' must all be in 'colnames(expr.data)' |
percentage.of.all.cells |
0 < float < 1, which percentage of all possible cells should be use to generate a cell type profile? |
normalize.to.count |
logical, normalize each profile? |
For each entry of 'included.in.X', 'percentage.of.all.cells' are randomly selected. Then, the reference profile is built by adding up all selected profiles of a type. Afterwards, each reference profile is normalized to a total number of counts.
For examples see the DTD vignette: browseVignettes("DTD")
list with two entries:
X.matrix: numeric matrix with as many rows as 'expr.data', and as many columns as 'length(included.in.X)'
samples.to.remove: vector of strings, all samples that have been used for generating X.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.