View source: R/plotting_functions.R
self_plot_pca | R Documentation |
Generate a PCA plot from a sleuth object with user-selected colour_by and title.
self_plot_pca( obj, pc_x = 1L, pc_y = 2L, units = "est_counts", color_by = NULL, show_legend = TRUE, graph_name = "Sample Plot Name", auto_save = FALSE, scaled = TRUE )
obj |
A sleuth object. |
pc_x |
Integer denoting the principle component to use for the x-axis. |
pc_y |
Integer denoting the principle component to use for the y-axis. |
units |
Either 'est_counts' ('scaled_reads_per_base' for gene_mode) or 'tpm'. |
color_by |
Column name to colour the samples by. Default is NULL. |
show_legend |
Boolean value if the legend should be shown in the figure out not. |
graph_name |
Name of the graph. Default is "Sample Plot Name". |
auto_save |
If TRUE, the plot will be saved automatically. Defaults to FALSE. |
scaled |
Only works if auto_save is TRUE. The plot will be automatically saved and scaled to the amount of variation per axis. Scale factor is 1:5. |
# Create a PCA plot from a sleuth object. self_plot_pca(so, colour_by = "tissue", graph_name = "All Samples")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.