Skip to content

Commit dda5e21

Browse files
author
Lin Yang
committed
fixed a bug of pca plot
1 parent e32eac5 commit dda5e21

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/preprocess/pca.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,18 @@ pca_plot <- function(exprTable, annot,title, Batch) {
6161

6262
if (opt$column != "False") {
6363
png(file = opt$out_before, res = 300, height = 1200, width = 1500)
64-
pca_plot(exprTable = expr_before, annot = annot, title = "PCA plot Before Batch Removal",Batch=Batch)
64+
p1 <- pca_plot(exprTable = expr_before, annot = annot, title = "PCA plot Before Batch Removal",Batch=Batch)
65+
print(p1)
6566
dev.off()
6667

6768
png(file = opt$out_after, res = 300, height = 1200, width = 1500)
68-
pca_plot(exprTable = expr_after, annot = annot, title = "PCA plot After Batch Removal",Batch = Batch)
69+
p2 <- pca_plot(exprTable = expr_after, annot = annot, title = "PCA plot After Batch Removal",Batch = Batch)
70+
print(p2)
6971
dev.off()
7072
} else
7173
{
7274
png(file = opt$out_before, res = 300, height = 1200, width = 1500)
73-
plot.new()
75+
plot.new()
7476
dev.off()
7577

7678
png(file = opt$out_after, res = 300, height = 1200, width = 1500)

0 commit comments

Comments
 (0)