From 11f4f178e5c6106239e1df22eb713e3dce66e8b3 Mon Sep 17 00:00:00 2001 From: Hugo VARET Date: Tue, 8 Jun 2021 14:24:37 +0200 Subject: [PATCH] bugFix --- R/MDSPlot.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/MDSPlot.R b/R/MDSPlot.R index ea272ca..d50e83b 100755 --- a/R/MDSPlot.R +++ b/R/MDSPlot.R @@ -16,8 +16,9 @@ MDSPlot <- function(dge, group, n=min(500, nrow(dge$counts)), gene.selection=c(" col=c("lightblue","orange","MediumVioletRed","SpringGreen"), outfile=TRUE, ggplot_theme=theme_gray()){ if (outfile) png(filename="figures/MDS.png", width=1800, height=1800, res=300) coord <- plotMDS(dge, top=n, method="logFC", gene.selection=gene.selection[1], plot=FALSE) - d <- data.frame(x=coord$x, y=coord$y, group = group, - factor(colnames(coord$distance.matrix.squared), levels = colnames(coord$distance.matrix.squared))) + d <- data.frame(x=coord$x, y=coord$y, group=group, + sample=factor(colnames(coord$distance.matrix.squared), + levels = colnames(coord$distance.matrix.squared))) print(ggplot(data=d, aes(x=.data$x, y=.data$y, color=group, label=sample)) + geom_point(show.legend=TRUE, size=3) + labs(color="") +