@@ -431,7 +431,8 @@ upload_module_normalization_server <- function(
431431 aa <- sort(unique(as.numeric(gsub(" .*,|\\ ]" , " " , as.character(x.avg2 )))))
432432 barplot(rbind(x.nar2 , 1 - x.nar2 ),
433433 beside = FALSE , names.arg = aa , las = 1 ,
434- xlab = " average intensity (log2)" , ylab = " missing value ratio" )
434+ xlab = " average intensity (log2)" , ylab = " missing value ratio"
435+ )
435436 title(" missingness vs. average intensity" )
436437 } else {
437438 plot.new()
@@ -441,19 +442,22 @@ upload_module_normalization_server <- function(
441442
442443 if (input $ missing_plottype == " missingness per sample" ) {
443444 if (any(X2 > 0 )) {
444- par(mfrow = c(1 ,1 ), mar = c(5 , 5 , 2 , 2 ), mgp = c(2.5 , 0.75 , 0 ))
445+ par(mfrow = c(1 , 1 ), mar = c(5 , 5 , 2 , 2 ), mgp = c(2.5 , 0.75 , 0 ))
445446 X3 <- imputedX()$ X
446- pct.na <- colMeans(is.na(X3 ))* 100
447- bp <- barplot(pct.na , col = " grey" , xaxt = " n" ,
448- ylab = " Missing %" , ylim = c(0 , max(pct.na )+ 10 ),
449- cex.lab = 1.5 , las = 2 )
450- cex <- max(0.7 , min(1.5 , 5 / ncol(X3 )))
451- text(x = bp , y = par(" usr" )[3 ] - 0.02 * diff(par(" usr" )[3 : 4 ]),
452- labels = names(pct.na ), srt = 45 , adj = 1 , xpd = TRUE , cex = cex )
453- title(" missingness per sample" ); grid()
447+ pct.na <- colMeans(is.na(X3 )) * 100
448+ bp <- barplot(pct.na ,
449+ col = " grey" , xaxt = " n" ,
450+ ylab = " Missing %" , ylim = c(0 , max(pct.na ) + 10 ),
451+ cex.lab = 1.5 , las = 2
452+ )
453+ text(
454+ x = bp , y = par(" usr" )[3 ] - 0.02 * diff(par(" usr" )[3 : 4 ]),
455+ labels = names(pct.na ), srt = 45 , adj = 1 , xpd = TRUE , cex = 1
456+ )
457+ title(" missingness per sample" )
458+ grid()
454459 rm(X3 )
455- }
456- else {
460+ } else {
457461 plot.new()
458462 text(0.5 , 0.5 , " no missing values" )
459463 }
@@ -833,8 +837,10 @@ upload_module_normalization_server <- function(
833837 # # "multi-omics combat" = "combat"
834838 )
835839 } else {
836- c(" CPM" , " CPM+quantile" , " TMM" , " quantile" ,
837- " maxMedian" , " maxSum" , " reference" )
840+ c(
841+ " CPM" , " CPM+quantile" , " TMM" , " quantile" ,
842+ " maxMedian" , " maxSum" , " reference"
843+ )
838844 },
839845 selected = 1
840846 ),
0 commit comments