Issue 253: Create Document Settings form and implement fold-change statistics

Status:closed
Assigned To:Guest
Type:Todo
Area:Skyline
Priority:2
Milestone:4.3
Opened:2013-07-26 12:31 by Brendan MacLean
Changed:2017-06-08 15:23 by Brendan MacLean
Resolved:2017-06-08 15:22 by Brendan MacLean
Resolution:Fixed
Duplicates:3
Closed:2017-06-08 15:23 by Brendan MacLean
2013-07-26 12:31 Brendan MacLean
Title»Create Document Settings form
Assigned To»Nick Shulman
Notify»Vagisha
Type»Todo
Area»Skyline
Priority»2
Milestone»2.1
Here is a short spec for the feature we were discussing this week:
- Add a Document Settings menu item to the Settings menu that brings up a tabbed form with the following tabs
    - Documentation
    - Reports
    - Annotations
    - Comparisons
- The Documentation tab could contain:
    - Title
    - Authors and affiliations
    - Abstract
    - Standard Operating Procedure
- The Reports tab would show a checked list with the same list of reports currently shown in File > Export > Report. Checked reports would be saved with the document, and restored to the reports list on document load, like the annotations.
- The Annotations tab would contain what is currently shown in the Settings > Annotations form, and Settings > Annotations would go away.
- The Comparisons tab would contain a list of Grouping comparisons that would be editable. The editor for these would contain two dropdown lists:
    - Grouping annotation
    - Control value
    - Identity annotation - allows for averaging technical replicates by, for example subject ID
  And a Normalize to group box containing the following options:
    - (o) Isotope label type with a combo box listing the isotope label types in the document
    - ( ) Peptide standards with a multi-line edit control for pasting peptide sequences into
    - ( ) Total signal (the sum of all peak areas for the file)

The comparisons tab would allow us to add fold-change information to both the reports and the Peak Areas - Peptide Comparison graph. To start with, we will do this the simple way that any researcher would do themselves, lacking more sophisticated statistical tools like MSstats and Linear Mixed Effects modeling. That is, we will simply average the values by Identity annotation, divide by the normalization factor, take the log base 2 of the result and subtract the mean of the control group from the mean of any other grouping value in the annotation.

The graph would also have whiskers, which would be settable in a properties form as either:
    - Confidence interval
    - Prediction interval
  With a choice of confidence levels 95% and 99%.

The confidence interval for this difference would be calculated as + or - sqrt(stderr1^2 + stderr2^2)*critical value, where the critical value for a standard normal at 95% confidence is 1.96. Since, these will likely be pretty small numbers included in the means, we should use a T distribution instead, which will require us to write a QT(prob, df) function to be able to get the critical value for 0.975 and 0.995 for various degrees of freedom (n1 + n2 - 2). Prediction intervals are just (stdev + stderr) * critical value. This is important for knowing when a difference might actually be useful for prediction (e.g. a biomarker) versus when just the means of the two groups are different to some level of confidence (e.g. a drug has an effect on a population).


2013-07-27 04:32 Brendan MacLean
I have added support to the Statistics class for determining the critical value for a T distribution. The function is Statistics.QT(double prob, double dof), where you supply the probability and the degrees of freedom. Probability would be 0.975 for 95% and 0.995 for %99 confidence intervals, since these are assumed to be bidirectional, and in fact, you confidence interval will span both sides of the estimated mean. The degrees of freedom should be n1 + n2 - 2, where n1 and n2 are the number of points after performing averaging by ID. This is why the ID field is important, because you will way over estimate your precision, if you simply treat every replicate as a data point, when in fact you have technical replicates for the same samples.

2013-08-09 15:40 Brendan MacLean
Issue 3 marked as duplicate of this bug.
2013-11-12 08:34 Brendan MacLean
TitleCreate Document Settings form»Create Document Settings form and implement fold-change statistics
NotifyVagisha»Stephanie Kaspar
Adding Stephanie Kaspar from Bruker, as she has expressed interest in this work.

2014-01-08 09:06 Brendan MacLean
Milestone2.1»2.6
Didn't make v2.5

2014-08-28 14:30 Brendan MacLean
Milestone2.6»3.1

2017-06-08 15:22 Brendan MacLean
resolve as Fixed
Statusopen»resolved
Assigned ToNick Shulman»Brendan MacLean
NotifyStephanie Kaspar»
Milestone3.1»
This seems to be long fixed.

2017-06-08 15:23 Brendan MacLean
close
Statusresolved»closed
Assigned ToBrendan MacLean»Guest