Skip to content

Commit

Permalink
Version 1.1.3
Browse files Browse the repository at this point in the history
- Occasionally, eBayes(trend=TRUE) fails for intensity-based data, particularly when the distribution of quantified features is not uniform across samples. In these cases, eBayes(trend=FALSE) is run instead, and a warning message is printed. We highly encourage users who encounter this warning to carefully examine their data, and re-perform statistical analysis as needed. Typically, setting a stricter missing value filter will fix the issue.
- The one-sample T-test is now fixed. It was not working due to an error in passing a parameter to the function.
- An issue with heatmap color annotations was fixed. The issue occured during conversion of certain annotation group names to R-compliant names.
  • Loading branch information
nmclark2 authored Feb 8, 2023
1 parent cf12e64 commit 9db26ec
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion global.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ options(repos = BiocManager::repositories())
## set to FALSE if deployed to RStudio Connect
PACMAN <- FALSE
## version number
VER <- "1.1.2"
VER <- "1.1.3"
## maximal file size for upload
MAXSIZEMB <<- 1024
## list of strings indicating missing data
Expand Down
5 changes: 3 additions & 2 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -1377,8 +1377,9 @@ shinyServer(
}

## robustify levels of group variable
#cdesc[, input$grp.gct3] <- make.names(cdesc[, input$grp.gct3])
#cdesc[, input$grp.norm] <- make.names(cdesc[, input$grp.norm])
## prevent NA from being converted (TEXT FILE INPUT ONLY)
cdesc[!is.na(cdesc[,input$grp.gct3]), input$grp.gct3] <- make.names(cdesc[!is.na(cdesc[,input$grp.gct3]), input$grp.gct3])
cdesc[!is.na(cdesc[,input$grp.norm]), input$grp.norm] <- make.names(cdesc[!is.na(cdesc[,input$grp.norm]), input$grp.norm])
global.input$cdesc <- cdesc

# initialize grp file
Expand Down
6 changes: 6 additions & 0 deletions src/helptext.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ printHTML <- function(input, output, session, what, error=NULL, global.input=NUL
if(what == 'cl'){
txt <- '<h4><font color="red">What\'s new?</font></h4>
<font size=\"3\">
<b>v1.1.3 February 8, 2023</b>\
<ul>
<li>Occasionally, eBayes(trend=TRUE) fails for intensity-based data, particularly when the distribution of quantified features is not uniform across samples. In these cases, eBayes(trend=FALSE) is run instead, and a warning message is printed. We highly encourage users who encounter this warning to carefully examine their data, and re-perform statistical analysis as needed. Typically, setting a stricter missing value filter will fix the issue.
<li> The one-sample T-test is now fixed. It was not working due to an error in passing a parameter to the function.
<li> An issue with heatmap color annotations was fixed. The issue occured during conversion of certain annotation group names to R-compliant names.
</ul>
<b>v1.1.2 January 18, 2023</b>\
<ul>
<li>Previously, raw log-fold changes were median-centered by default. Raw log-fold changes are no longer median-centered so that they accurately reflect the fold change before any normalization is performed.
Expand Down
28 changes: 18 additions & 10 deletions src/modT.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ modT.test <- function (d, output.prefix, id.col=NULL, data.col=NULL, fix.id=FALS

## moderated t test
##View(data)
mod.t.result <- moderated.t (data, intensity)
mod.t.result <- moderated.t (data, intensity=intensity)
##View(data)
if (use.adj.pvalue) mod.sig <- mod.t.result [,'adj.P.Val'] <= p.value.alpha
else mod.sig <- mod.t.result [,'P.Value'] <= p.value.alpha
Expand Down Expand Up @@ -186,8 +186,14 @@ modF.test <- function (d, class.vector, output.prefix, id.col=NULL,
data.rownorm <- sweep (data, MARGIN=1, STATS=apply (data, 1, mean, na.rm=TRUE))
fit <- lmFit (data.rownorm, design)
#trend=TRUE for intensity data
#if it fails, do trend=FALSE
if(intensity){
fit <- eBayes (fit, trend=TRUE, robust=TRUE)
fit <- tryCatch({
eBayes (fit, trend=TRUE, robust=TRUE)},
error= function(e){
shinyalert("Setting intensity-trend failed. Performing with trend=FALSE. This usually occurs when the distribution of detected features is not uniform across samples. Please evaluate your data and consider re-running analysis with a stricter missing value filter.",type="warning",immediate=T)
eBayes (fit, trend=FALSE, robust=TRUE)
})
}else{
fit <- eBayes (fit, robust=TRUE)
}
Expand Down Expand Up @@ -248,9 +254,15 @@ moderated.t <- function (data, design=NULL, intensity=FALSE) {
## two sample test
if(!is.null(design)){
m <- lmFit (data.matrix, design)
#trend=TRUE for intensity data
#try trend=TRUE for intensity data
#if it fails, perform trend=FALSE
if(intensity){
m <- eBayes (m, trend=TRUE, robust=TRUE)
m <- tryCatch({
eBayes (m, trend=TRUE, robust=TRUE)},
error= function(e){
shinyalert("Setting intensity-trend failed. Performing with trend=FALSE. This usually occurs when the distribution of detected features is not uniform across samples. Please evaluate your data and consider re-running analysis with a stricter missing value filter.",type="warning",immediate=T)
eBayes (m, trend=FALSE, robust=TRUE)
})
}else{
m <- eBayes (m, robust=TRUE)
}
Expand All @@ -261,12 +273,8 @@ moderated.t <- function (data, design=NULL, intensity=FALSE) {
##cat('here2 ')
m <- lmFit (data.matrix, method='robust')
##cat('here3 ')
#trend=TRUE for intensity data
if(intensity){
m <- eBayes (m, trend=TRUE, robust=TRUE)
}else{
m <- eBayes (m, robust=TRUE)
}
#one-sample t-test is only run for ratio data
m <- eBayes (m, robust=TRUE)
##at('here4 ')
sig <- topTable (m, number=nrow(data), sort.by='none')
##cat('here5 ')
Expand Down

0 comments on commit 9db26ec

Please sign in to comment.