Two-samples t-Tests

From MicrobeMS Wiki
Jump to: navigation, search

Introduction

T-test.jpg

This function performs two-samples t-tests in each segment of the MALDI-TOF mass spectra using peak tables as inputs. t-tests are useful for biomarker screening in ensembles of mass spectra exhibiting certain degree of similarity. A two-samples t-test in a given m/z segment returns a test decision for the null hypothesis H(0) that the peak intensity data in class I and class II come from independent random samples from normal distributions with equal means and variances. The alternative hypothesis H(1) is that the peak intensity data come from populations with unequal means.

See also t-test (Wikipedia)

Parameter of the two-samples t-test

  • m/z range: boundaries of the m/z region in which the t-tests are performed
  • α: significance level of the t-tests
  • dx (ppm): a parameter defining the width and the number of the m/z spectra segments. For example, a spectral segment centered at the position x covers a m/z interval of the width x * dx/10^6. The boundaries of the spectra segments are defined by [x*(1-dx/(2*10^6))] and [x*(1+dx/(2*10^6))], respectively. For values of x = 2000 (m/z) and dx = 1000, the width of the respectice segment is 2 and the m/z values of the boundaries are 1999 and 2001.
  • intensity: defines if barcode spectra or peak weighting factors are utilized as test inputs
  • show histogram: provides a histogram of the test outputs (p-values, t-values, etc.) and gives also the mean, median and the standard deviation of the test variables.

Performing a serial t-test

1. Load the mass spectral data files via the load spectra (Bruker data file format),
   import spectra from mzXML data, or the load MS multifile options of the File 
   pulldown menu.
2. Two-samples t-tests are carried out from labeled spectra, i.e. from spectra with a class assignment. 
   To perform the test label two groups of spectra as class 1 and as class 2, respectively. Labelling, 
   or class assignment, can be carried out by selecting the appropriate spectra and choosing class 
   assignments --> class X from the Edit pulldown menu.
3. The t-test routine always starts from original MALDI-TOF mass spectra, i.e.  spectral 
   pre-processing and peak detection is carried out automatically using pre-defined parameters. 
   Existing pre-processed spectra and pre-defined peak tables are ignored by the test routine.
4. Define test parameter, such as α (significance level), the m/z range and dx (ppm) which has a default
   value of 1000 (relative, in ppm). The parameter dx defines the width of m/z segments in which spectra
   are divided during the test. Peaks found in the same m/z segment are considered identical while
   mass peaks in different segments are considered different peaks. 
5. When finished select t-test from the Analysis pulldown menu. Choose options plot decision for H(0),
   plot p-values or plot t-values, to obtain the respective outputs of the t-tests.

Output of an univariate t-test


Example of the output from a serial t-test taken from the log file of MicrobeMS:

   peakstats(tsttyp,prm,class)
   tsttyp: ttest
   prm   : 2
   class : 0
   ******************************************************
   * univariate t-tests
   *   p-value
   ******************************************************
    
   number of spectra of class 1: 53
   number of spectra of class 2: 55
   start mass  : 2000 m/z
   end mass    : 12000 m/z
   alpha       : 0.0001
   allowed ppm : 1000
   use peak intensities [0(NO)/1(YES)]: 0
    
  #1, p-value  4.4406e-11 at m/z = 2518.0283
  #2, p-value  1.1177e-09 at m/z = 8035.9213
  #3, p-value  1.1547e-08 at m/z = 3876.8279
  #4, p-value  4.633e-08 at m/z = 6772.547
  #5, p-value  1.0154e-07 at m/z = 6481.3235
  #6, p-value  1.5417e-06 at m/z = 6552.5802
  #7, p-value  4.7364e-06 at m/z = 3519.6031
  #8, p-value  4.7364e-06 at m/z = 3983.3741
  #9, p-value  1.0863e-05 at m/z = 2871.5769
  #10, p-value  0.00036899 at m/z = 3277.395
  #11, p-value  0.0019455 at m/z = 5033.1774
  #12, p-value  0.021796 at m/z = 2764.2031
  #13, p-value  0.035168 at m/z = 3178.2104
  #14, p-value  0.0398 at m/z = 3307.8312
  #15, p-value  0.040363 at m/z = 5525.5352
  #16, p-value  0.053241 at m/z = 4046.9202
  #17, p-value  0.073176 at m/z = 8090.9843
  #18, p-value  0.12269 at m/z = 6744.2579
  #19, p-value  0.14863 at m/z = 7059.8915
  #20, p-value  0.17529 at m/z = 2967.2566
  #21, p-value  0.18459 at m/z = 4591.731
  #22, p-value  0.2057 at m/z = 3352.5822
  #23, p-value  0.23803 at m/z = 5671.5438
  #24, p-value  0.30801 at m/z = 5438.3043
  #25, p-value  0.31058 at m/z = 6423.0388
  #26, p-value  0.31058 at m/z = 6844.4122
  #27, p-value  0.33198 at m/z = 7566.6528
  #28, p-value  0.37979 at m/z = 4815.43
  #29, p-value  0.43903 at m/z = 5953.9217
  #30, p-value  0.45171 at m/z = 4177.5814

T-test-plot.jpg