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,
type = c("reg", "student", "weight"),
show_outliers = TRUE,
show_plot = TRUE,
...
)ggplot_residuals(
fit,
test,
type = c("reg", "student", "weight"),
show_outliers = TRUE
)
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.
'deconv' class deconvolution object
bulk gene expression matrix assumed to be in raw counts
Specifies type of residuals to be plotted
Logical whether to show any remaining outlying extreme genes in red
Logical whether to show plot using base graphics (used to allow return of dataframe of points without plotting)
Optional arguments passed to plot()