| plot_residuals | R Documentation |
Plots residuals from a deconvolution result object against bulk gene expression (on semi-log axis). Normal residuals, weighted residuals or Studentized residuals can be visualised to check for heteroscedasticity and genes with extreme errors.
plot_residuals(
fit,
test = NULL,
type,
show_outliers = TRUE,
show_plot = TRUE,
...
)
ggplot_residuals(
fit,
test = NULL,
type,
show_outliers = TRUE,
nlabels = 0,
...
)
fit |
'deconv' class deconvolution object |
test |
bulk gene expression matrix assumed to be in raw counts. If
|
type |
Specifies type of residuals to be plotted, either "raw" for unweighted residuals, "weight" for weighted residuals, or "student" for Studentized residuals. |
show_outliers |
Logical whether to show any remaining outlying extreme genes in red |
show_plot |
Logical whether to show plot using base graphics (used to allow return of dataframe of points without plotting) |
... |
Optional arguments passed to |
nlabels |
Number of outlying gene labels to add. Labels are only added if outliers are detected. Although each gene has a point for the residual for every bulk sample, only the point with the maximum absolute residual is labelled. |
Produces a scatter plot in base graphics. Returns invisibly a dataframe of the coordinates of the points. The ggplot version returns a ggplot2 plotting object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.