diff --git a/description-column-headers.xlsx b/description-column-headers.xlsx new file mode 100644 index 0000000..bfa7e9a Binary files /dev/null and b/description-column-headers.xlsx differ diff --git a/global.R b/global.R index b6e8b3a..1a8e0b8 100644 --- a/global.R +++ b/global.R @@ -32,7 +32,7 @@ options(repos = BiocManager::repositories()) ## set to FALSE if deployed to RStudio Connect PACMAN <- FALSE ## version number -VER <- "1.1.3" +VER <- "1.1.4" ## maximal file size for upload MAXSIZEMB <<- 1024 ## list of strings indicating missing data @@ -563,7 +563,7 @@ calculate_fc <- function(tab, grp.vec, groups.comp, test, ## for one-sample and none, it is average, not FC if(test %in% c("One-sample mod T", "none")){ - colnames(group_fc) <- paste0('avg.raw.', colnames(group_fc)) + colnames(group_fc) <- paste0('AveExpr.raw.', colnames(group_fc)) }else{ colnames(group_fc) <- paste0('logFC.raw.', colnames(group_fc)) } diff --git a/server.R b/server.R index 8939e7d..fe8223c 100644 --- a/server.R +++ b/server.R @@ -159,6 +159,7 @@ shinyServer( hm.max.val=4, hm.show.rownames=T, hm.show.colnames=T, + hm.clust="none", ## PCA pca.x='PC 1', @@ -232,7 +233,7 @@ shinyServer( #updateCheckboxInput(session, 'export.pca.loadings', 'PCA loadings (xls)', value=!input$export.toggle.all) updateCheckboxInput(session, 'export.ms', 'Multiscatter', value=!input$export.toggle.all) updateCheckboxInput(session, 'export.excel', 'Excel sheet', value=!input$export.toggle.all) - updateCheckboxInput(session, 'export.gct.file', 'GCT files: 1) original data and 2) signed log p-values', value=!input$export.toggle.all) + updateCheckboxInput(session, 'export.gct.file', 'GCT files: 1) normalized data and 2) signed log p-values', value=!input$export.toggle.all) updateCheckboxInput(session, 'export.cm', 'Correlation matrix', value=!input$export.toggle.all) updateCheckboxInput(session, 'export.cb', 'Correlation boxplot', value=!input$export.toggle.all) updateCheckboxInput(session, 'export.profile', 'Profile plot', value=!input$export.toggle.all) @@ -374,7 +375,7 @@ shinyServer( #checkboxInput('export.pca.loadings', "PCA loadings (xls)", value = T), checkboxInput('export.ms', 'Multiscatter',value=T), checkboxInput('export.excel', 'Excel sheet',value=T), - checkboxInput('export.gct.file', 'GCT files: 1) original data and 2) signed log p-values',value=T), + checkboxInput('export.gct.file', 'GCT files: 1) normalized data and 2) signed log p-values',value=T), checkboxInput('export.cm', 'Correlation matrix',value=T), checkboxInput('export.cb', 'Correlation boxplot',value=T), checkboxInput('export.profile', 'Profile plot',value=T), @@ -1439,7 +1440,7 @@ shinyServer( if(!input$grp.norm.check & "Group"%in%colnames(cdesc)){ cdesc$Group <- rep("None",dim(cdesc)[1]) } - global.param$cdesc.all <- global.param$cdesc.selection <- cdesc[rownames(cdesc)%in%grp.file$Column.Name,colSums(is.na(cdesc))% data.matrix fc <- rdesc[, logfc.colnames ] %>% data.matrix @@ -4489,6 +4487,7 @@ shinyServer( withProgress(message='Two-sample test', value=0, { count=0 + res.comb <- tab ## loop over groups for(g in unique(groups.comp)){ @@ -4504,16 +4503,24 @@ shinyServer( ## the actual test ############################# res.tmp <- modT.test.2class( tab.group, groups=groups.tmp, id.col=id.col, label=g , intensity=intensity)$output - - if(count == 0){ - res.comb <- res.tmp - } else { - ## make sure the order is correct - if(nrow(res.tmp ) != nrow(res.comb)) stop( "number of rows don't match!\n" ) - res.tmp <- res.tmp[rownames(res.comb), ] - ##res.comb <- cbind(res.comb, res.tmp) - res.comb <- data.frame(res.comb, res.tmp, stringsAsFactors=F) - } + #previous code would incorrectly throw away a test result if a feature was missing + # if(count == 0){ + # res.comb <- res.tmp + # } else { + # ## make sure the order is correct + # if(nrow(res.tmp ) != nrow(res.comb)) stop( "number of rows don't match!\n" ) + # #res.tmp <- res.tmp[rownames(res.comb), ] + # ##res.comb <- cbind(res.comb, res.tmp) + # res.comb <- data.frame(res.comb, res.tmp, stringsAsFactors=F) + # } + + + #create data frame of expression values and test results + res.test <- res.tmp[, !colnames(res.tmp)%in%colnames(res.comb)] + res.comb <- merge(res.comb,res.test,by="row.names",all=T) + rownames(res.comb) <- res.comb[,1] + res.comb <- res.comb[,-1] + ################################################## ## progress bar incProgress(count/length(unique(groups.comp)), detail=g) @@ -4546,7 +4553,7 @@ shinyServer( withProgress(message='One-sample T test', value=0, { count=0 - + res.comb <- tab ## loop over groups for(g in unique(groups.comp)){ @@ -4555,14 +4562,20 @@ shinyServer( colnames(tab.group)[1] <- id.col res.tmp <- modT.test( tab.group, id.col=id.col, plot=F, nastrings=NASTRINGS, label=g, na.rm=FALSE)$output - - if(count == 0){ - res.comb <- res.tmp - } else { - if(nrow(res.tmp ) != nrow(res.comb)) stop( "number of rows don't match!\n" ) - res.tmp <- res.tmp[rownames(res.comb), ] - res.comb <- cbind(res.comb, res.tmp) - } + #previous code would incorrectly throw away a test result if a feature was missing + # if(count == 0){ + # res.comb <- res.tmp + # } else { + # if(nrow(res.tmp ) != nrow(res.comb)) stop( "number of rows don't match!\n" ) + # res.tmp <- res.tmp[rownames(res.comb), ] + # res.comb <- cbind(res.comb, res.tmp) + # } + + #create data frame of expression values and test results + res.test <- res.tmp[, !colnames(res.tmp)%in%colnames(res.comb)] + res.comb <- merge(res.comb,res.test,by="row.names",all=T) + rownames(res.comb) <- res.comb[,1] + res.comb <- res.comb[,-1] ############################################# ## update progress bar @@ -4585,6 +4598,7 @@ shinyServer( res.comb <- data.frame(id=res.id, res.test, res.exprs, stringsAsFactors=F) ##res.comb <- res.comb[tab[, id.col], ] res.comb <- res.comb[rownames(tab),] + } ################################## @@ -7073,7 +7087,6 @@ shinyServer( plotHM(res=res, hm.rownames=hm.rownames, grp=grp.hm, grp.col=global.param$grp.colors, grp.col.legend=global.param$grp.colors.legend, hm.clust=input$hm.clust, hm.title=hm.title, hm.scale=input$hm.scale, cellwidth=cw, fontsize_row=input$cexRow, fontsize_col=input$cexCol, style=global.param$which.test, anno.col=anno.col, anno.col.color=anno.col.color, show.rownames=input$hm.show.rownames, show.colnames=input$hm.show.colnames, height=min( dynamicHeightHM( nrow(global.results$filtered)), 1200 ), width=dynamicWidthHM(length(global.param$grp))) - }) } }, diff --git a/src/helptext.R b/src/helptext.R index 2f9b567..4ecd9b9 100644 --- a/src/helptext.R +++ b/src/helptext.R @@ -32,6 +32,14 @@ printHTML <- function(input, output, session, what, error=NULL, global.input=NUL if(what == 'cl'){ txt <- '

What\'s new?

+v1.1.4 March 7, 2023\ + v1.1.3 February 8, 2023\