Commit 9c227381 authored by Simon CHEVOLLEAU's avatar Simon CHEVOLLEAU 💻
Browse files

Update

parent 33c68275
......@@ -237,14 +237,14 @@ umapAllKit <- function(umapAll, merged_cell_annotation, annot, colorScale = FALS
return(plot)
}
umapExpr <- function(umapAll, gene, correctedAll, annot, dataset="Dataset", sampleAnnot, main, violin_plot = FALSE, pointSize = 3, colorUmap = c("blue", "white", "red"), ...){
umapExpr <- function(umapAll, gene, correctedAll, annot, dataset="Dataset", sampleAnnot, main, violin_plot = FALSE, pointSize = 3, colorScale = c("blue", "white", "red"), ...){
#' Plot UMAP with numeric variable
#'
#' @description WRAPPER
if(is.element(gene, rownames(correctedAll))){
print(paste0("gene : ", gene))
print(paste0("annotation : ", annot))
plot <- proj2dWideColor(umapAll,group = as.numeric(correctedAll[gene,]), main=main, pointSize = pointSize, returnGraph = TRUE, colorScale = colorUmap)
plot <- proj2d(umapAll, 1:2, group = as.numeric(correctedAll[gene]), pointSize=pointSize, plotText=FALSE, main = main, returnGraph=T, colorScale = colorScale)
if (violin_plot)
violinPlot(sampleAnnot[, annot], as.numeric(correctedAll[gene,]), sampleAnnot[, dataset], title.x=annot,title.group=dataset, title.y=gene, title=main)
}
......@@ -390,7 +390,7 @@ getColors <- function() {
return(colors_list)
}
plotCompressedUmapExpr <- function(dir_path, pdf_path, names_list, correctedAll, umapAll, merged_cell_annotation, annot = "res.0.75", dataset = "Dataset", pointSize=2, nrow = 3, ncol = 3, colorUmap = c("blue", "white", "red"), ...) {
plotCompressedUmapExpr <- function(dir_path, pdf_path, names_list, correctedAll, umapAll, merged_cell_annotation, annot = "res.0.75", dataset = "Dataset", pointSize=2, nrow = 3, ncol = 3, colorScale = c("blue", "white", "red"), ...) {
plot_list_compressed <- list()
plot_list <- list()
for (marker in names_list){
......
Supports Markdown
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