View source: R/function_plot_esti_vs_true.R
ggplot_true_vs_esti | R Documentation |
'ggplot_true_vs_esti' can be used to evaluate a trained DTD model, in the way that it plots known/true quantities versus estimated quantities per cell type. As input, 'ggplot_true_vs_esti' expects a DTD.model, and test.data. For an example see section "Correlation per cell type" in the package vignette 'browseVignettes("DTD")'
ggplot_true_vs_esti( DTD.model, X.matrix = NA, test.data, norm.typewise = FALSE, estimate.c.type = NA, title = "", shape.indi = NA, show.legend = FALSE )
DTD.model |
either a numeric vector with length of nrow(X), or a list
returned by |
X.matrix |
numeric matrix, with features/genes as rows, and cell types as column. Each column of X.matrix is a reference expression profile. A trained DTD model includes X.matrix, it has been trained on. Therefore, X.matrix should only be set, if the 'DTD.model' is not a DTD model. |
test.data |
list, with two entries, a numeric matrix each,
named 'mixtures' and 'quantities' For examples see |
norm.typewise |
logical, in the known AND estimated quantity matrix, should every type (=> row) be normalized to range from 0 to 1? |
estimate.c.type |
string, either "non_negative", or "direct". Indicates how the algorithm finds the solution of arg min_C ||diag(g)(Y - XC)||_2.
|
title |
string, additionally title |
shape.indi |
vector with length 'ncol(test.data$quantities)', is passed to shape argument of aes in geom_point. Idea is to mark samples from different origin. If set to NA, the shape will not be showed. |
show.legend |
logical, should the legend be plotted? Notice, this function generates a plot, holding a subfigure for each type of the deconvolution. In every subfigure, the cell type, and the corresponding correlation is shown. This parameter only controls the additional legend. |
ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.