Skip to content

Commit

Permalink
Version 1.1.2
Browse files Browse the repository at this point in the history
- 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.
- When a one-sample T-test or no test is performed, raw average abundances per group are reported in the place of fold change. Column headers and descriptors in the exported excel file have been updated to reflect this for these cases.
- Help text has been updated to clarify that data must be log-transformed prior to statistical analysis. The statistical testing performed in Protigy is not valid for non-log-transformed data.
  • Loading branch information
nmclark2 authored Jan 18, 2023
1 parent e7e5d6e commit cf12e64
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
Binary file modified docs/description-column-headers.xlsx
Binary file not shown.
11 changes: 8 additions & 3 deletions 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.1"
VER <- "1.1.2"
## maximal file size for upload
MAXSIZEMB <<- 1024
## list of strings indicating missing data
Expand Down Expand Up @@ -510,7 +510,7 @@ calculate_fc <- function(tab, grp.vec, groups.comp, test,
mode='sort', ## for assigning pairwise comparisons
## sort: group names are ordered alphanumerically
## e.g. "Exp_B" and "Exp_A" -> "Exp_A.vs.Exp_B",
center=T ## if TRUE median centering will be applied
center=F ## if TRUE median centering will be applied
){
#browser()
groups <- unique(grp.vec)
Expand Down Expand Up @@ -561,7 +561,12 @@ calculate_fc <- function(tab, grp.vec, groups.comp, test,
if(center)
group_fc <- apply(group_fc, 2, function(column) column - median(column, na.rm=T))

colnames(group_fc) <- paste0('logFC.raw.', colnames(group_fc))
## 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))
}else{
colnames(group_fc) <- paste0('logFC.raw.', colnames(group_fc))
}
return(group_fc)
}

Expand Down
6 changes: 3 additions & 3 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
##
## This file defines the server logical of the app. It also takes care of most of the user interface.
##
## Last updated January 5, 2023 by Natalie Clark ([email protected]) - v 1.1.1
## Last updated January 18, 2023 by Natalie Clark ([email protected]) - v 1.1.2
################################################################################################################
p_load(shiny)

Expand Down Expand Up @@ -2305,7 +2305,7 @@ shinyServer(

list(
checkboxInput('intensity','Intensity data',FALSE),
radioButtons('log.transform', 'Log-transformation', choices=c('none', 'log10', 'log2'), selected=global.param$log.transform), #checkboxInput('norm.per.group', 'Normalize per group', value = global.param$norm.per.group ),
radioButtons('log.transform', 'Log-transformation', choices=c('none', 'log10', 'log2'), selected=global.param$log.transform), #checkboxInput('norm.per.group', 'Normalize per group', value = global.param$norm.per.group ),
radioButtons('norm.data', 'Data normalization', choices=c('Median', 'Median (non-zero)', 'Median-MAD', 'Median-MAD (non-zero)', 'Upper-quartile', '2-component', 'Quantile', 'VSN', 'none'), selected=global.param$norm.data), #checkboxInput('norm.per.group', 'Normalize per group', value = global.param$norm.per.group),
#sliderInput('na.filt.val', 'Max. % missing values', min=0, max=100, value=global.param$na.filt.val),
numericInput('na.filt.val', 'Max. % missing values', min=0, max=100, step=5, value=global.param$na.filt.val),
Expand All @@ -2331,7 +2331,7 @@ shinyServer(
list(
checkboxInput('intensity','Intensity data',FALSE),
#radioButtons('log.transform', 'Log-transformation', choices=c('none', 'log10', 'log2'), selected=global.param$log.transform),
radioButtons('log.transform', 'Log-transformation', choices=c('none', 'log10', 'log2'), selected=input$log.transform), #checkboxInput('norm.per.group', 'Normalize per group', value = input$norm.per.group),
radioButtons('log.transform', 'Log-transformation', choices=c('none', 'log10', 'log2'), selected=input$log.transform), #checkboxInput('norm.per.group', 'Normalize per group', value = input$norm.per.group),

#radioButtons('norm.data', 'Data normalization', choices=c('Median', 'Median (non-zero)', 'Median-MAD', 'Median-MAD (non-zero)', 'Upper-quartile', '2-component', 'Quantile', 'VSN', 'none'), selected=global.param$norm.data),
radioButtons('norm.data', 'Data normalization', choices=c('Median', 'Median (non-zero)', 'Median-MAD', 'Median-MAD (non-zero)', 'Upper-quartile', '2-component', 'Quantile', 'VSN', 'none'), selected=input$norm.data),
Expand Down
8 changes: 7 additions & 1 deletion 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.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.
<li>When a one-sample T-test or no test is performed, raw average abundances per group are reported in the place of fold change. Column headers and descriptors in the exported excel file have been updated to reflect this for these cases.
<li>Help text has been updated to clarify that data must be log-transformed prior to statistical analysis. The statistical testing performed in Protigy is not valid for non-log-transformed data.
</ul>
<b>v1.1.1 January 5, 2023</b>\
<ul>
<li>A checkbox has been added for group-wise normalization on the group assignment screen. When this box is checked, group normalization will be performed based on the selected column. When the box is left unchecked, group normalization will not be performed. This replaces the previous checkbox on the statistical analysis screen.
Expand Down Expand Up @@ -698,7 +704,7 @@ If the ID column contains <a href=\"http://www.uniprot.org/\" target=\"_blank_\"

txt <- paste('<font size=\"4\">
<p><h3>Intensity data</h3>Check the box if you are using raw or log-transformed intensity data. Only the relevant normalization methods and statistical tests for intensity data will now show under \'Data normalization\' and \'Select test\'.</p>
<p><h3>Log-transformation</h3>Apply log transformation to the data.</p>
<p><h3>Log-transformation</h3>Apply log transformation to the data. <b>Data MUST be log-transformed for statistical testing!</b> If you select "none," we assume you have already log-transformd your data.</p>
<p><h3>Normalize per group</h3>If enabled the normalization will be performed within a particular group (Median, Median-MAD, Quantile, VSN). For Median and Median-MAD normalization, the group-level median of sample medians is added to each normaized data value.</p>
<p><h3>Data normalization</h3>You can apply different normalization methods to the data prior to testing. The methods are applied for each sample (column) separately, except for \'Quantile\' and \'VSN\' normalization which take the entire matrix into account.</p>
<p>
Expand Down

0 comments on commit cf12e64

Please sign in to comment.