PCA_plotter | R Documentation |
This function allows you to plot PCA
PCA_plotter(se, nfeature, color, shape, assays, xaxisPC, yaxisPC,
log_option = FALSE)
se |
SummarizedExperiment object |
nfeature |
number of features |
color |
choose a color |
shape |
choose a shape |
assays |
array of assay names from |
xaxisPC |
the PC to plot as the x axis |
yaxisPC |
the PC to plot as the y axis |
log_option |
TRUE if data should be logged before plotting (recommended for sequencing counts), FALSE if data should not be logged (for instance, data is already logged); FALSE by default |
List containing PCA info, PCA variance and PCA plot
library(scran)
se <- mockSCE()
se_object_ComBat_Seq <- BatchQC::batch_correct(se, method = "ComBat-Seq",
assay_to_normalize = "counts",
batch = "Mutation_Status",
covar = "Treatment",
output_assay_name =
"ComBat_Seq_Corrected")
pca_plot <- BatchQC::PCA_plotter(se = se_object_ComBat_Seq,
nfeature = 2, color = "Mutation_Status",
shape = "Treatment",
assays = c("counts", "ComBat_Seq_Corrected"),
xaxisPC = 1, yaxisPC = 2, log_option = FALSE)
pca_plot$plot
pca_plot$var_explained
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.