Plot the results of a filtering report generated by prioritise_targets.
report_plot(
rep_dt,
results,
phenotype_to_genes = HPOExplorer::load_phenotype_to_genes(),
annot = HPOExplorer::load_phenotype_to_genes("phenotype.hpoa"),
remove_cols = c("Rows", "ids"),
show_plot = TRUE,
save_plot = tempfile(fileext = "_report_plot.pdf"),
verbose = TRUE,
...
)
Report table.
The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results.
Output of load_phenotype_to_genes mapping phenotypes to gene annotations.
HPO annotations.
Columns to remove from rep_dt
.
Show the plot.
Path to save the plot to.
Print messages.
Arguments passed on to ggplot2::ggsave
filename
File name to create on disk.
plot
Plot to save, defaults to last plot displayed.
device
Device to use. Can either be a device function (e.g. png), or one of "eps", "ps", "tex" (pictex), "pdf", "jpeg", "tiff", "png", "bmp", "svg" or "wmf" (windows only).
path
Path of the directory to save plot to: path
and filename
are combined to create the fully qualified file name. Defaults to the
working directory.
scale
Multiplicative scaling factor.
width,height,units
Plot size in units
("in", "cm", "mm", or "px").
If not supplied, uses the size of current graphics device.
dpi
Plot resolution. Also accepts a string input: "retina" (320), "print" (300), or "screen" (72). Applies only to raster output types.
limitsize
When TRUE
(the default), ggsave()
will not
save images larger than 50x50 inches, to prevent the common error of
specifying dimensions in pixels.
bg
Background colour. If NULL
, uses the plot.background
fill value
from the plot theme.
ggplot object
results <- load_example_results()
rep_dt <- example_targets$report
gp <- report_plot(rep_dt=rep_dt, results=results)
#> report_plot:: Preparing data.
#> Reading cached RDS file: phenotype.hpoa
#> + Version: v2023-10-09
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2023-10-09
#> Loading required namespace: rvest
#> report_plot:: Preparing plot.
#> Warning: The `facets` argument of `facet_grid()` is deprecated as of ggplot2 2.2.0.
#> ℹ Please use the `rows` argument instead.
#> ℹ The deprecated feature was likely used in the MultiEWCE package.
#> Please report the issue at
#> <https://github.com/neurogenomics/MultiEWCE/issues>.
#> Saving plot ==> /tmp/Rtmp0tNWxK/file26a92ff8c571_report_plot.pdf
#> Saving 6.67 x 6.67 in image