
****************************************************** REPRODUCIBLE FILES TO THE PAPER *******************************************************

"Gram-negative and positive Bacteria Differentiation in Blood Culture Samples by Headspace Volatile Compound Analysis" (2016)

by M.E. Dolch, S. Janitza, A.-L. Boulesteix, C. Grassmann-Lichtenauer, S. Praun, W. Denzer, G. Schelling and S. Schubert


**********************************************************************************************************************************************

If you have any questions regarding these files, please contact S. Janitza (janitza@ibe.med.uni-muenchen.de)



********* CONTENTS *********



 * R-Code
      - for comparing all used methods ('comparison_of_methods.r')
      - for reproducing the RF prediction rule ('deriving_final_RF_prediction_rule.r')
      - for evaluating the final RF prediction rule on the validation data ('validation_of_RF_prediction_rule.r')
      - for plotting distributions of the ten discriminators in training and validation set ('Figure_1.R')

 * 'Data' folder: including the data on anaerobic blood culture samples and R-code for reproducing splitting into training and validation data set

 * 'R_Objects' folder: including
      - the final RF prediction rule derived on the training data ('RF_prediction_rule.Rda')
      - all prediction rules produced by CMA ('all_classifiers.Rda'), 
      - rankings of predictors by Gini VIM produced by CMA ('GeneSelection') based on 5-fold cross-validation ('sel_RF.Rda')




********* INSTRUCTIONS *********

- Unzip the file reproducible_files.zip. Do not change the structure of the folder. 
- Make sure that the software R and the necessary R packages are installed.
- For reproducing the results please install:
   * R version 2.13.1 (64 bit)
   * CMA version 1.10.0
   * Biobase version 2.12.2
   * randomForest version 4.6-2
- for comparing all used methods run the file 'comparison_of_methods.r'
- for reproducing the RF prediction rule run the file 'deriving_final_RF_prediction_rule.r'
- for evaluating the final RF prediction rule on the validation data run the file 'validation_of_RF_prediction_rule.r'
- for plotting distributions of the ten discriminators in training and validation set run the file 'Figure_1.R'
- for applying the random forest prediction rule to your own data load the file 'RF_prediction_rule.Rda' contained in the folder 'Data' into the workspace (via function load()) and use the function predict() to obtain predictions (please also see the comment below)



********* DETAILS ON DATA *********

Note that the namings of the discriminators are different in the paper and in the data set. 
Variable names correspondening to the terminology in the paper for the 10 m/z signals with the highest rankings by random forests Gini variable importance measure:

     Naming in
 Data set    Paper
------------------
   EIH2      H_2
   H2S       34   
   M35       35
   X35Xe     35* 
   M36       36  
   M64       64 
   SO2Xe     64*
   M66       66 
   X76Xe     76*
   X80Xe     80*


