Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 26ee545d rédigé par Simon CHEVOLLEAU's avatar Simon CHEVOLLEAU :computer:
Parcourir les fichiers

Update

parent c0483617
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -303,7 +303,7 @@ distinctPaletteColor <- function(factorVec) {
return(cols)
}
one_dimension <- function(x, annot, text_annot, name_annot, size_point = 3, segment_size = 1, jitter_amount = 0.3, arrow = FALSE, colors = NULL, legend_title = TRUE){
one_dimension <- function(x, annot, text_annot, name_annot, size_point = 3, segment_size = 1, jitter_amount = 0.3, arrow = FALSE, colors = NULL, legend_title = TRUE, print_text_annot = T){
library(ggplot2)
library(viridis)
y <- c()
......@@ -414,7 +414,7 @@ plotCompressedUmapAllKit <- function(dir_path, pdf_path, desired_annots, annotCo
ggsave(paste0(dir_path, "/compressed_", pdf_path), marrangeGrob(plot_list_compressed, nrow= nrow, ncol= ncol))
}
plotMultipleOneDimension <- function(table, pseudotimes, dir_path, colors = NULL, size_point = 1, legend_title = TRUE, jitter_amount = 0.3, return_plot = T) {
plotMultipleOneDimension <- function(table, pseudotimes, dir_path, colors = NULL, size_point = 1, legend_title = T, jitter_amount = 0.3, return_plot = T, print_text_annot = T) {
plots <- list()
for (gene in rownames(table)){
psdtp_list <- list(); annot_list <- list(); text_annot <- list()
......@@ -441,7 +441,7 @@ plotMultipleOneDimension <- function(table, pseudotimes, dir_path, colors = NULL
color <- NULL
}
plots[[gene]] <- one_dimension(psdtp_list, annot_list, text_annot, gene, colors = color, size_point = 1, legend_title, jitter_amount = jitter_amount)
plots[[gene]] <- one_dimension(psdtp_list, annot_list, text_annot, gene, colors = color, size_point = 1, legend_title, jitter_amount = jitter_amount, print_text_annot = print_text_annot)
ggsave(paste0(dir_path, "/", gene, ".pdf"), plots[[gene]])
}
return(plots)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter