Commit b91645ce authored by domingue's avatar domingue

Replaced static PCA with interactive version

parent d51bf434
......@@ -95,6 +95,7 @@ load_pack("patchwork")
load_pack("corrplot")
load_pack("d3heatmap")
load_pack("UpSetR")
load_pack("plotly")
# BiocManager::install("BiocStyle")
load_pack("BiocStyle")
......@@ -437,7 +438,24 @@ colnames(data_results)
#' This can be very useful to observe batch effects, such as clear differences between replicates.
#' Plot the first and second principal components
plot_pca(dep, x = 1, y = 2, n = 500, point_size = 4)
# plot_pca(dep, x = 1, y = 2, n = 500, point_size = 4)
effects <- experimental_design %>%
select(-one_of("label", "replicate")) %>%
colnames()
htmltools::tagList(lapply(effects, function(batchFactor) {
# batchFactor=effects[1]
condition = pull(experimental_design, batchFactor)
names(condition) = experimental_design$label
{
makePcaPlot(t(SummarizedExperiment::assay(dep)), color_by = condition, scale = T, title = "Normalized intensities") +
guides(color = guide_legend(title = batchFactor))
} %>% ggplotly()
}))
#' ## Correlation matrix
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment