/*
 * -------------------------------------------------
 *  Nextflow config all the parameters of the workflow
 * -------------------------------------------------
 */

params {
  // General parameters

  /*
   * Required inputs for identification.
   * One can choose several search engines to be used
   * You will need to set parameters of each search engine you want to use.
   * Don't forget that some search engines need a database file to be supplied
   */

  publishDir_intermediate = false // set to true to publish all the middle stages
  perform_identification = false // Set to false if you don't want to do identification. You will not require to set MS2 related parameters if you set this to false
  perform_identification_metfrag = false // Should Metfrag be used for doing identification?
  perform_identification_csifingerid = false // Should CSI:FingerID be used for doing identification?
  perform_identification_cfmid = false // Should CFM-ID be used for doing identification?
  perform_identification_internal_library = false // Should an internal library be used for doing identification?

  type_of_ionization = 'pos' // You can either set to 'pos' (only positive), 'neg' (only negative), 'both' (both positive and negative).
  need_centroiding = false // Set to true if your data is in profile mode (only for quantification!)

  quantification_openms_xcms_pos = 'xcms' // set whether you want to do quantification with OpenMS (openms) or XCMS (xcms) in positive ionization
  quantification_openms_xcms_neg = 'xcms' // set whether you want to do quantification with OpenMS (openms) or XCMS (xcms) for negative ionization

  peakpicker_ini_file_pos_openms = "$baseDir/assets/openms/openms_peak_picker_ini_pos.ini" //Path to the ini file for PeakPickerHiRes
  peakpicker_ini_file_neg_openms = "$baseDir/assets/openms/openms_peak_picker_ini_neg.ini" //Path to the ini file for PeakPickerHiRes

  featurefinder_ini_pos_openms = "$baseDir/assets/openms/openms_feature_finder_metabo_ini_pos.ini" // Path to the ini file for OpenMS FeatureFinderMetabo in positive mode
  featurefinder_ini_neg_openms = "$baseDir/assets/openms/openms_feature_finder_metabo_ini_neg.ini" // Path to the ini file for OpenMS FeatureFinderMetabo in negative mode

  quantification_openms_xcms_library_pos = 'xcms' // set whether you want to do quantification with OpenMS (openms) or XCMS (xcms) in positive ionization  (for library)
  quantification_openms_xcms_library_neg = 'xcms' // set whether you want to do quantification with OpenMS (openms) or XCMS (xcms) for library (negative)

  peakpicker_ini_file_library_pos_openms = "$baseDir/assets/openms/openms_peak_picker_lib_ini_pos.ini" //Path to the ini file for PeakPickerHiRes (for library)
  peakpicker_ini_file_library_neg_openms = "$baseDir/assets/openms/openms_peak_picker_lib_ini_neg.ini" //Path to the ini file for PeakPickerHiRes  (for library)
  featurefinder_ini_library_pos_openms = "$baseDir/assets/openms/openms_feature_finder_metabo_lib_ini_pos.ini" // Path to the ini file for OpenMS FeatureFinderMetabo in positive mode  (for library)
  featurefinder_ini_library_neg_openms = "$baseDir/assets/openms/openms_feature_finder_metabo_lib_ini_neg.ini" // Path to the ini file for OpenMS FeatureFinderMetabo in negative mode  (for library)

  // Input files for MS1 quantification (this needs to be provided)
  //quant_mzml_files_pos = "" // Path to a folder containing mzML files used for doing quantification (MS1 data in positive ionization method)

  input = '' // Path to a folder containing mzML files used for doing quantification (MS1 data in positive ionization method)
  quant_mzml_files_neg = '' // Path to a folder containing mzML files used for doing quantification (MS1 data in negative ionization method)

  // Input csv file for the experimental design
  phenotype_design_pos = '' // Path to a csv file containing the experimental design (MS1 data in positive ionization method)
  phenotype_design_neg = '' // Path to a csv file containing the experimental design (MS1 data in negative ionization method)

  // Input files for MS2 identification. If you don't want to identification you can leave them blank. If your MS1 and MS2 files are the same, you should set this to the same path
  id_mzml_files_pos = '' // Path to a folder containing mzML files used for doing identification (MS2 data in positive ionization method)
  id_mzml_files_neg = '' // Path to a folder containing mzML files used for doing identification (MS2 data in negative ionization method)

  // Input files for the library identification. Set if you select identification with the library for either pos or neg or both
  library_charactrized_pos = false // if you have already charaztrized your positive library set this to true and specify the path for library_charactrization_file_pos
  library_charactrization_file_pos = '' // path to the file from charaztrized library (positive)
  library_charactrized_neg = false // if you have already charaztrized your negative library set this to true and specify the path for library_charactrization_file_neg
  library_charactrization_file_neg = '' // path to the file from charaztrized library (negative)

  quant_library_mzml_files_pos = '' // Path to a folder containing library mzML files used for doing adduct calcculation (MS1 data in positive ionization method)
  id_library_mzml_files_pos = '' // Path to a folder containing mzML files used for doing identification (MS2 data in positive ionization method)
  library_description_pos = '' // Path to a csv file containing description of the library for positive (see the help)
  quant_library_mzml_files_neg = '' // Path to a folder containing library mzML files used for doing adduct calcculation (MS1 data in megative ionization method)
  id_library_mzml_files_neg = '' // Path to a folder containing mzML files used for doing identification (MS2 data in negative ionization method)
  library_description_neg = '' // Path to a csv file containing description of the library for negative (see the help)

  // XCMS positive parameters
  // IPO settings (if you don't want to optimize a particular parameter, set both lower and higher to the same value)
  performIPO_pos = 'none' // controls how to perform IPO possible values: "none": don't perform IPO, "global": performs IPO on all or selected number of samples. "global_quant": perform IPO only for quantification (not retention time correction and grouping), "local": performs IPO on individual samples one at the time. "local_quant": performs IPO on individual samples only for quantification, "local_RT": performs IPO on only for retention time correction and grouping.

  ipo_allSamples_pos = false // Performs IPO on all the samples irrespective of the class they have
  ipo_columnToSelect_pos = 'Class' // If ipo_allSamples_pos is false, one must pass the phenotype file to select sample. This parameter select the column of the phenotype file.
  ipo_valueToSelect_pos = 'QC' // Selects the files only with this value in the columnToSelect column
  // IPO quantification settings (only needed if selected to do quantification optimization)
  ipo_methodXset_pos = 'centWave' // Quantification methods for IPO. Only centWave is supported at this stage.
  ipo_noise_l_pos = 0 // lowest level of noise
  ipo_noise_h_pos = 0 // highest level of noise
  ipo_snthresh_l_pos = 10 // lowest level of signal to noise threshold
  ipo_snthresh_h_pos = 10 // highest level of signal to noise threshold
  ipo_mzCenterFun_pos = 'wMean' // Function for centering the mz
  ipo_integrate_pos = 1 // Integration method. If ' = 1' peak limits are found through descent on the mexican hat filtered data, if ' = 2' the descent is done on the real data. Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact.
  ipo_fitgauss_pos = false // logical, if TRUE a Gaussian is fitte
  ipo_min_peakwidth_l_pos = 12 // lower minimum width of peaks
  ipo_min_peakwidth_h_pos = 28 // higher minimum width of peaks
  ipo_max_peakwidth_l_pos = 35 // lower maximum width of peaks
  ipo_max_peakwidth_h_pos = 65 // higher maximum width of peaks
  ipo_ppm_l_pos = 17 // lower ppm mass deviation
  ipo_ppm_h_pos = 32 // higher ppm mass deviation
  ipo_mzdiff_l_pos = -0.001 // lower minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  ipo_mzdiff_h_pos = 0.010 // higher minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  ipo_charge_camera_pos = 1 // maximum charge of molecules (only used in individual setting)
  ipo_max_ppm_camera_pos = 10 // ppm mass deviation for adducts (only used in individual setting)
  ipo_prefilter_l_l_pos = 3 // lower value of K in 'prefilter_pos = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity >_pos = 'I'.
  ipo_prefilter_l_h_pos = 3 // higher value of K in 'prefilter_pos = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity >_pos = 'I'.
  ipo_prefilter_h_l_pos = 100 // lower I in prefilter
  ipo_prefilter_h_h_pos = 100 // higher I in prefilter
  ipo_ncores_pos = 5 // number of cores used in IPO

  // IPO RT and group settings (only needed if selected to do RT and group optimization)
  ipo_gapInit_l_pos = 0.0 // lower Penalty for Gap opening
  ipo_gapInit_h_pos = 0.4 // higher Penalty for Gap opening
  ipo_gapExtend_l_pos = 2.1 // lower Penalty for Gap enlargement
  ipo_gapExtend_h_pos = 2.7 // higher Penalty for Gap enlargement
  ipo_profStep_l_pos = 0.7 // lower step size (in m/z) to use for profile generation from the raw data files
  ipo_profStep_h_pos = 1.0 // higher step size (in m/z) to use for profile generation from the raw data files
  ipo_response_l_pos = 1 // lower Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  ipo_response_h_pos = 1 // higher Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  ipo_factorDiag_l_pos = 2 // lower Local weighting applied to diagonal moves in alignment.
  ipo_factorDiag_h_pos = 2 // higher Local weighting applied to diagonal moves in alignment.
  ipo_factorGap_l_pos = 1 // lower Local weighting applied to gap moves in alignment.
  ipo_factorGap_h_pos = 1 // higher Local weighting applied to gap moves in alignment.
  ipo_localAlignment_pos = 0 //Local rather than global alignment
  ipo_bw_l_pos = 22 // lower bandwidth (consider something like retention time differences)
  ipo_bw_h_pos = 38 // higher bandwidth (consider something like retention time differences)
  ipo_minfrac_l_pos = 0.3 // lower minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_minfrac_h_pos = 0.7 // higher minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_mzwid_l_pos = 0.015 // lower mz width (mz differences)
  ipo_mzwid_h_pos = 0.035 // higher mz width (mz differences)
  ipo_minsamp_l_pos = 1 // lower minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_minsamp_h_pos = 1 // higher minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_max_l_pos = 50 // lower maximum number of groups to identify in a single m/z slice
  ipo_max_h_pos = 50 // higher maximum number of groups to identify in a single m/z slice
  ipo_distFunc_pos = 'cor_opt' // DistFunc function: cor (Pearson's R) or cor_opt (default, calculate only 10% diagonal band of distance matrix, better runtime), cov (covariance), prd (product), euc (Euclidean distance)
  ipo_methodRT_pos = 'obiwarp' // Only obiwarp is supported

  // XCMS positive parameters
  masstrace_ppm_pos_xcms = 10 // masstrance deviation in ppm
  peakwidthlow_quant_pos_xcms = 5 // lower width of peaks
  peakwidthhigh_quant_pos_xcms = 30 // highest width of peaks
  noise_quant_pos_xcms = 1000 // level of noise
  mzdiff_quant_pos_xcms = -0.001 //minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  snthresh_quant_pos_xcms = 10 // signal to noise ratio cutoff, definition see below.
  prefilter_quant_pos_xcms = 3 // K in 'prefilter = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity > = 'I'.
  value_of_prefilter_quant_pos_xcms = 100 // I in prefilter
  mzCenterFun_quant_pos_xcms = 'wMean' // Function to calculate the m/z center of the feature: 'wMean' intensity weighted mean of the feature m/z values, 'mean' mean of the feature m/z values, 'apex' use m/z value at peak apex, 'wMeanApex3' intensity weighted mean of the m/z value at peak apex and the m/z value left and right of it, 'meanApex3' mean of the m/z value at peak apex and the m/z value left and right of it.
  integrate_quant_pos_xcms = 1 // Integration method. If ' = 1' peak limits are found through descent on the mexican hat filtered data, if ' = 2' the descent is done on the real data. Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact.
  fitgauss_quant_pos_xcms = false // logical, if TRUE a Gaussian is fitte
  phenodatacolumn_quant_pos = 'Class' // name of the column in the phenotype_design_pos showing class information of the samples
  sampleclass_quant_pos_xcms = 'Sample' // A name for the class of sample

  // correct retention time positive
  method_align_N1_pos_xcms = 'obiwarp' // name of the method for correcting the RT shifts.
  profStep_align_N1_pos_xcms = 1 // step size (in m/z) to use for profile generation from the raw data files
  center_align_N1_pos_xcms = 'NULL' // the index of the sample all others will be aligned to. If center = NULL, the sample with the most peaks is chosen as default.
  response_align_N1_pos_xcms = 1// Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  distFunc_align_N1_pos_xcms = 'cor_opt' //DistFunc function: cor (Pearson's R) or cor_opt (default, calculate only 10% diagonal band of distance matrix, better runtime), cov (covariance), prd (product), euc (Euclidean distance)
  gapInit_align_N1_pos_xcms = 'NULL' //Penalty for Gap opening
  gapExtend_align_N1_pos_xcms = 'NULL' //Penalty for Gap enlargement
  factorDiag_align_N1_pos_xcms = 2 //Local weighting applied to diagonal moves in alignment.
  factorGap_align_N1_pos_xcms = 1 //Local weighting applied to gap moves in alignment.
  localAlignment_align_N1_pos_xcms = 0 //Local rather than global alignment

  // group peaks Number 1 positive
  bandwidth_group_N1_pos_xcms = 15 // bandwidth (consider something like retention time differences)
  mzwid_group_N1_pos_xcms = 0.005 // mz width (mz differences)
  minfrac_group_N1_pos_xcms = 0.5// minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  minsamp_group_N1_pos_xcms = 1 // minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  max_group_N1_pos_xcms = 50 // maximum number of groups to identify in a single m/z slice

  // filtering parameters

  // blank filtering
  blank_filter_pos = false // set to true if you want to remove signal from blan
  method_blankfilter_pos_xcms = 'max' // method of sumarization of signal in blank samples
  blank_blankfilter_pos_xcms = 'Blank' // Name of the class of the blank samples
  sample_blankfilter_pos_xcms = 'Sample' // Name of the class of the biological samples
  rest_blankfilter_pos_xcms = 'T' // set to T to compare blanks only to rest of the samples

  // dilution filtering
  dilution_filter_pos = false
  corto_dilutionfilter_pos_xcms = '0.5,1,2,4' // the sequence of you dilution serie. For example if you have been adding double the concentration every time. This has to be separated by comma!
  dilution_dilutionfilter_pos_xcms = 'D1,D2,D3,D4' // The class of the samples represneting dilution. This has to be separated by comma!
  pvalue_dilutionfilter_pos_xcms = 0.05 // p-value of the correlation. Anything higher than this will be removed!
  corcut_dilutionfilter_pos_xcms = -1 // minimum expected correlation. Aniything lower than this will be removed!
  abs_dilutionfilter_pos_xcms = 'F' // If the tool should consider absolute correlation rather than the typical one from [-1 to 1]

  // cv filtering
  cv_filter_pos = false
  qc_cvfilter_pos_xcms = 'QC' // class of your QC samples
  cvcut_cvfilter_pos_xcms = 0.3 // Maximum coefficient of variation you expect. Anything higher than this will be removed!

  // camera parameters

  // Camera group
  sigma_group_pos_camera = 8 // sigma value for grouping the peaks across chromatogram
  perfwhm_group_pos_camera = 0.6 // full width at half maximum for finding overlaping peaks
  intval_group_pos_camera = 'maxo' // which intensity value to use

  // camera find adducts
  ppm_findaddcuts_pos_camera = 10 // ppm deviation between theoritical adduct mass and the experimental one
  polarity_findaddcuts_pos_camera = 'positive' // this has to be positive (for testing only)!

  // camera find isotopes
  maxcharge_findisotopes_pos_camera = 1 // number of changes to consider (most often 1 is enough)

  // Identification parameters

  // Mapping MS2 ions to mass traces
  ppm_mapmsmstocamera_pos_msnbase = 10 // ppm deviation when mapping MS2 parent ion to a mass trace
  rt_mapmsmstocamera_pos_msnbase = 5 // rt difference (in second) for mapping MS2 parent ion to a mass trace (the mass trace is a range, star and end of the trace)

  // global search Engine parameters

  precursorppm_msmstoparam_pos_msnbase = 10 // relative mass tolerance of the precursor (ppm)
  fragmentppm_msmstoparam_pos_msnbase = 20 // relative mass tolerance of the fragment ions (ppm)
  fragmentabs_msmstoparam_pos_msnbase = 0.05 // absolute mass tolerance of the fragment ions
  database_msmstoparam_pos_msnbase = 'LocalCSV' // type of database to use
  mode_msmstoparam_pos_msnbase = 'pos' // ionization method. This has to be pos (only for testing at this stage)
  adductRules_msmstoparam_pos_msnbase = 'primary' // adduct rules (primary or extended)
  minPeaks_msmstoparam_pos_msnbase = 2 // ions with less that this number will be removed

  // CSI:FINGERID parameters
  database_csifingerid_pos_csifingerid = 'hmdb' // IMPORTANT: we don't support database file for csi:fingerid. You will need to provide what database to use here, the rest of the parameters will be taken from there parameter file
  ncore_csifingerid_pos_csifingerid = 2 // number of cores that csi can use
  timeout_csifingerid_pos_csifingerid = 600 // number of seconds that each csi ion can rum (time limit)

  // MetFrag
  database_csv_files_pos_metfrag = ''// path to a csv file containing your database
  ncore_pos_metfrag = 2 // number of cores that metfrag can use

  // CFM-ID
  database_csv_files_pos_cfmid = '' // path to a csv file containing your database
  ncore_pos_cfmid = 2 // number of cores that cfm can use

  candidate_id_identification_pos_cfmid = 'Identifier' // name of the column in the database for id of the molecules
  candidate_inchi_smiles_identification_pos_cfmid = 'SMILES' // name of the column in the database for smile of the molecules
  candidate_mass_identification_pos_cfmid = 'MonoisotopicMass' // name of the column in the database for mass of the molecules
  database_name_column_identification_pos_cfmid = 'Name' // name of the column in the database for name of the molecules
  database_inchI_column_identification_pos_cfmid = 'InChI' // name of the column in the database for inchi of the molecules

  // output options
  ppm_output_pos_camera = 10 // relative difference of mass of the ID hit compare to a mass trace (ppm)
  rt_output_pos_camera = 5 // retention time difference of ID to mass trace (second)
  higher_the_better_output_pos_camera = true // is higher the score the better (not used for now)
  impute_output_pos_camera = true // should we impute adduct and different chance states with the same ID
  type_column_output_pos_camera = 'Class' // Class of the samples (used for statistics and coverage calculations)
  selected_type_output_pos_camera = 'Sample' // what class of samples do you want to keep (anything not matching this in the Class column will be removed)
  rename_output_pos_camera = true // you want to rename the files
  rename_col_output_pos_camera = 'rename' // which column of the phenotype file to use for renaming
  only_report_with_id_output_pos_camera = false // do only want to see the identified mass traces or everything?
  combine_replicate_output_pos_camera = false // do you have technical replicates you want to average ?
  combine_replicate_column_output_pos_camera = 'rep' // which column of the phenotype file show the technical replicates
  log_output_pos_camera = true // should we log2 the output
  sample_coverage_output_pos_camera = 50 // any mass trace having more pecentage of the missing value will be removed
  sample_coverage_method_output_pos_camera = 'global' // how to calculate missing value percentrage? global across all the samples? or name of the column in the phenotype file showing the grouping
  ncore_output_pos_camera = 1 // number of cores used for mapping the features
  normalize_output_pos_camera = '1' // do you want to normalize the data set to 'NA' if you don't want noremalization

  // library paramteres
  raw_file_name_preparelibrary_pos_msnbase = 'rawFile' // name of the column showing which raw files contain which metabolite in the library_description_pos csv file
  compund_id_preparelibrary_pos_msnbase = 'HMDB.YMDB.ID' // name of the column showing id of the metabolites in the library_description_pos csv file
  compound_name_preparelibrary_pos_msnbase = 'PRIMARY_NAME' // name of the compount column in the library_description_pos csv file
  mz_col_preparelibrary_pos_msnbase = 'mz' // name of the mz column in the library_description_pos csv file
  which_mz_preparelibrary_pos_msnbase = 'f' // "f" or "c", showing whether the Feature range or centroid of the feature should be used for mapping
  ncore_searchengine_library_pos_msnbase = 1 // Number of cores for mapping the features
  ppm_create_library_pos_msnbase = 10 // ppm error for mapping the library characterization masses to the experimental one

  // XCMS library positive parameters
  // IPO settings (if you don't want to optimize a particular parameter, set both lower and higher to the same value)
  performIPO_library_pos = 'none' // controls how to perform IPO possible values: "none": don't perform IPO, "global": performs IPO on all or selected number of samples. "local": performs IPO on individual samples one at the time.

  // IPO quantification settings (only needed if selected to do quantification optimization)
  ipo_methodXset_library_pos = 'centWave' // Quantification methods for IPO. Only centWave is supported at this stage.
  ipo_noise_l_library_pos = 0 // lowest level of noise
  ipo_noise_h_library_pos = 0 // highest level of noise
  ipo_snthresh_l_library_pos = 10 // lowest level of signal to noise threshold
  ipo_snthresh_h_library_pos = 10 // highest level of signal to noise threshold
  ipo_mzCenterFun_library_pos = 'wMean' // Function for centering the mz
  ipo_integrate_library_pos = 1 // Integration method. If ' = 1' peak limits are found through descent on the mexican hat filtered data, if ' = 2' the descent is done on the real data. Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact.
  ipo_fitgauss_library_pos = false // logical, if TRUE a Gaussian is fitte
  ipo_min_peakwidth_l_library_pos = 12 // lower minimum width of peaks
  ipo_min_peakwidth_h_library_pos = 28 // higher minimum width of peaks
  ipo_max_peakwidth_l_library_pos = 35 // lower maximum width of peaks
  ipo_max_peakwidth_h_library_pos = 65 // higher maximum width of peaks
  ipo_ppm_l_library_pos = 17 // lower ppm mass deviation
  ipo_ppm_h_library_pos = 32 // higher ppm mass deviation
  ipo_mzdiff_l_library_pos = -0.001 // lowerminimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  ipo_mzdiff_h_library_pos = 0.010 // higher minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  ipo_charge_camera_library_pos = 1 // maximum charge of molecules (only used in individual setting)
  ipo_max_ppm_camera_library_pos = 10 // ppm mass deviation for adducts (only used in individual setting)
  ipo_prefilter_l_l_library_pos = 3 // lower value of K in 'prefilter_library_pos = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity >_library_pos = 'I'.
  ipo_prefilter_l_h_library_pos = 3 // higher value of K in 'prefilter_library_pos = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity >_library_pos = 'I'.
  ipo_prefilter_h_l_library_pos = 100 // lower I in prefilter
  ipo_prefilter_h_h_library_pos = 100 // higher I in prefilter
  ipo_ncores_library_pos = 5 // number of cores used in IPO

  // IPO RT and group settings (only needed if selected to do RT and group optimization)
  ipo_gapInit_l_library_pos = 0.0 // lower Penalty for Gap opening
  ipo_gapInit_h_library_pos = 0.4 // higher Penalty for Gap opening
  ipo_gapExtend_l_library_pos = 2.1 // lower Penalty for Gap enlargement
  ipo_gapExtend_h_library_pos = 2.7 // higher Penalty for Gap enlargement
  ipo_profStep_l_library_pos = 0.7 // lower step size (in m/z) to use for profile generation from the raw data files
  ipo_profStep_h_library_pos = 1.0 // higher step size (in m/z) to use for profile generation from the raw data files
  ipo_response_l_library_pos = 1 // lower Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  ipo_response_h_library_pos = 1 // higher Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  ipo_factorDiag_l_library_pos = 2 // lower Local weighting applied to diagonal moves in alignment.
  ipo_factorDiag_h_library_pos = 2 // higher Local weighting applied to diagonal moves in alignment.
  ipo_factorGap_l_library_pos = 1 // lower Local weighting applied to gap moves in alignment.
  ipo_factorGap_h_library_pos = 1 // higher Local weighting applied to gap moves in alignment.
  ipo_localAlignment_library_pos = 0 //Local rather than global alignment
  ipo_bw_l_library_pos = 22 // lower bandwidth (consider something like retention time differences)
  ipo_bw_h_library_pos = 38 // higher bandwidth (consider something like retention time differences)
  ipo_minfrac_l_library_pos = 0.3 // lower minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_minfrac_h_library_pos = 0.7 // higher minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_mzwid_l_library_pos = 0.015 // lower mz width (mz differences)
  ipo_mzwid_h_library_pos = 0.035 // higher mz width (mz differences)
  ipo_minsamp_l_library_pos = 1 // lower minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_minsamp_h_library_pos = 1 // higher minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_max_l_library_pos = 50 // lower maximum number of groups to identify in a single m/z slice
  ipo_max_h_library_pos = 50 // higher maximum number of groups to identify in a single m/z slice
  ipo_distFunc_library_pos = 'cor_opt' // DistFunc function: cor (Pearson's R) or cor_opt (default, calculate only 10% diagonal band of distance matrix, better runtime), cov (covariance), prd (product), euc (Euclidean distance)
  ipo_methodRT_library_pos = 'obiwarp' // Only obiwarp is supported

  // XCMS library positive parameters
  masstrace_ppm_library_pos_xcms = 10 // masstrance deviation in ppm
  peakwidthlow_quant_library_pos_xcms = 5 // lower width of peaks
  peakwidthhigh_quant_library_pos_xcms = 30 // highest width of peaks
  noise_quant_library_pos_xcms = 1000 // level of noise
  mzdiff_quant_library_pos_xcms = -0.001 //minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  snthresh_quant_library_pos_xcms = 10 // signal to noise ratio cutoff, definition see below.
  prefilter_quant_library_pos_xcms = 3 // K in 'prefilter = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity > = 'I'.
  value_of_prefilter_quant_library_pos_xcms = 100 // I in prefilter
  mzCenterFun_quant_library_pos_xcms = 'wMean' // Function to calculate the m/z center of the feature: 'wMean' intensity weighted mean of the feature m/z values, 'mean' mean of the feature m/z values, 'apex' use m/z value at peak apex, 'wMeanApex3' intensity weighted mean of the m/z value at peak apex and the m/z value left and right of it, 'meanApex3' mean of the m/z value at peak apex and the m/z value left and right of it.
  integrate_quant_library_pos_xcms = 1 // Integration method. If ' = 1' peak limits are found through descent on the mexican hat filtered data, if ' = 2' the descent is done on the real data. Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact.
  fitgauss_quant_library_pos_xcms = false // logical, if TRUE a Gaussian is fitte
  phenodatacolumn_quant_library_pos = 'Class' // name of the column in the phenotype_design_library_pos showing class information of the samples
  sampleclass_quant_library_pos_xcms = 'Sample' // A name for the class of sample

  // group library camera
  sigma_group_library_pos_camera = 8 // sigma value for grouping the peaks across chromatogram
  perfwhm_group_library_pos_camera = 0.6 // full width at half maximum for finding overlaping peaks
  intval_group_library_pos_camera = 'maxo' // which intensity value to use

  // find adduct library pos
  ppm_findaddcuts_library_pos_camera = 10 // ppm deviation between theoritical adduct mass and the experimental one
  polarity_findaddcuts_library_pos_camera = 'positive' // this has to be positive (for testing only)!

  // camera find isotopes library pos
  maxcharge_findisotopes_library_pos_camera = 1 // number of changes to consider (most often 1 is enough)

  // Mapping MS2 ions to mass traces library pos
  ppm_mapmsmstocamera_library_pos_msnbase = 10 // ppm deviation when mapping MS2 parent ion to a mass trace
  rt_mapmsmstocamera_library_pos_msnbase = 5 // rt difference (in second) for mapping MS2 parent ion to a mass trace (the mass trace is a range, star and end of the trace)

  /*
   * paramteres for negative data if you chose to do negative. see type_of_ionization
   */

  // XCMS negative parameters
  // IPO settings (if you don't want to optimize a particular parameter, set both lower and higher to the same value)
  performIPO_neg = 'none' // controls how to perform IPO possible values: "none": don't perform IPO, "global": performs IPO on all or selected number of samples. "global_quant": perform IPO only for quantification (not retention time correction and grouping), "local": performs IPO on individual samples one at the time. "local_quant": performs IPO on individual samples only for quantification, "local_RT": performs IPO on only for retention time correction and grouping.

  ipo_allSamples_neg = false // Performs IPO on all the samples irrespective of the class they have
  ipo_columnToSelect_neg = 'Class' // If ipo_allSamples_neg is false, one must pass the phenotype file to select sample. This parameter select the column of the phenotype file.
  ipo_valueToSelect_neg = 'QC' // Selects the files only with this value in the columnToSelect column
  // IPO quantification settings (only needed if selected to do quantification optimization)
  ipo_methodXset_neg = 'centWave' // Quantification methods for IPO. Only centWave is supported at this stage.
  ipo_noise_l_neg = 0 // lowest level of noise
  ipo_noise_h_neg = 0 // highest level of noise
  ipo_snthresh_l_neg = 10 // lowest level of signal to noise threshold
  ipo_snthresh_h_neg = 10 // highest level of signal to noise threshold
  ipo_mzCenterFun_neg = 'wMean' // Function for centering the mz
  ipo_integrate_neg = 1 // Integration method. If ' = 1' peak limits are found through descent on the mexican hat filtered data, if ' = 2' the descent is done on the real data. Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact.
  ipo_fitgauss_neg = false // logical, if TRUE a Gaussian is fitte
  ipo_min_peakwidth_l_neg = 12 // lower minimum width of peaks
  ipo_min_peakwidth_h_neg = 28 // higher minimum width of peaks
  ipo_max_peakwidth_l_neg = 35 // lower maximum width of peaks
  ipo_max_peakwidth_h_neg = 65 // higher maximum width of peaks
  ipo_ppm_l_neg = 17 // lower ppm mass deviation
  ipo_ppm_h_neg = 32 // higher ppm mass deviation
  ipo_mzdiff_l_neg = -0.001 // lowerminimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  ipo_mzdiff_h_neg = 0.010 // higher minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  ipo_charge_camera_neg = 1 // maximum charge of molecules (only used in individual setting)
  ipo_max_ppm_camera_neg = 10 // ppm mass deviation for adducts (only used in individual setting)
  ipo_prefilter_l_l_neg = 3 // lower value of K in 'prefilter_neg = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity >_neg = 'I'.
  ipo_prefilter_l_h_neg = 3 // higher value of K in 'prefilter_neg = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity >_neg = 'I'.
  ipo_prefilter_h_l_neg = 100 // lower I in prefilter
  ipo_prefilter_h_h_neg = 100 // higher I in prefilter
  ipo_ncores_neg = 5 // number of cores used in IPO

  // IPO RT and group settings (only needed if selected to do RT and group optimization)
  ipo_gapInit_l_neg = 0.0 // lower Penalty for Gap opening
  ipo_gapInit_h_neg = 0.4 // higher Penalty for Gap opening
  ipo_gapExtend_l_neg = 2.1 // lower Penalty for Gap enlargement
  ipo_gapExtend_h_neg = 2.7 // higher Penalty for Gap enlargement
  ipo_profStep_l_neg = 0.7 // lower step size (in m/z) to use for profile generation from the raw data files
  ipo_profStep_h_neg = 1.0 // higher step size (in m/z) to use for profile generation from the raw data files
  ipo_response_l_neg = 1 // lower Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  ipo_response_h_neg = 1 // higher Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  ipo_factorDiag_l_neg = 2 // lower Local weighting applied to diagonal moves in alignment.
  ipo_factorDiag_h_neg = 2 // higher Local weighting applied to diagonal moves in alignment.
  ipo_factorGap_l_neg = 1 // lower Local weighting applied to gap moves in alignment.
  ipo_factorGap_h_neg = 1 // higher Local weighting applied to gap moves in alignment.
  ipo_localAlignment_neg = 0 //Local rather than global alignment
  ipo_bw_l_neg = 22 // lower bandwidth (consider something like retention time differences)
  ipo_bw_h_neg = 38 // higher bandwidth (consider something like retention time differences)
  ipo_minfrac_l_neg = 0.3 // lower minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_minfrac_h_neg = 0.7 // higher minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_mzwid_l_neg = 0.015 // lower mz width (mz differences)
  ipo_mzwid_h_neg = 0.035 // higher mz width (mz differences)
  ipo_minsamp_l_neg = 1 // lower minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_minsamp_h_neg = 1 // higher minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_max_l_neg = 50 // lower maximum number of groups to identify in a single m/z slice
  ipo_max_h_neg = 50 // higher maximum number of groups to identify in a single m/z slice
  ipo_distFunc_neg = 'cor_opt' // DistFunc function: cor (Pearson's R) or cor_opt (default, calculate only 10% diagonal band of distance matrix, better runtime), cov (covariance), prd (product), euc (Euclidean distance)
  ipo_methodRT_neg = 'obiwarp' // Only obiwarp is supported

  // XCMS negative parameters
  masstrace_ppm_neg_xcms = 10 // masstrance deviation in ppm
  peakwidthlow_quant_neg_xcms = 5 // lower width of peaks
  peakwidthhigh_quant_neg_xcms = 30 // highest width of peaks
  noise_quant_neg_xcms = 1000 // level of noise
  mzdiff_quant_neg_xcms = -0.001 //minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  snthresh_quant_neg_xcms = 10 // signal to noise ratio cutoff, definition see below.
  prefilter_quant_neg_xcms = 3 // K in 'prefilter = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity > = 'I'.
  value_of_prefilter_quant_neg_xcms = 100 // I in prefilter
  mzCenterFun_quant_neg_xcms = 'wMean' // Function to calculate the m/z center of the feature: 'wMean' intensity weighted mean of the feature m/z values, 'mean' mean of the feature m/z values, 'apex' use m/z value at peak apex, 'wMeanApex3' intensity weighted mean of the m/z value at peak apex and the m/z value left and right of it, 'meanApex3' mean of the m/z value at peak apex and the m/z value left and right of it.
  integrate_quant_neg_xcms = 1 // Integration method. If ' = 1' peak limits are found through descent on the mexican hat filtered data, if ' = 2' the descent is done on the real data. Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact.
  fitgauss_quant_neg_xcms = false // logical, if TRUE a Gaussian is fitte
  phenodatacolumn_quant_neg = 'Class' // name of the column in the phenotype_design_neg showing class information of the samples
  sampleclass_quant_neg_xcms = 'Sample' // A name for the class of sample

  // correct retention time negative
  method_align_N1_neg_xcms = 'obiwarp' // name of the method for correcting the RT shifts.
  profStep_align_N1_neg_xcms = 1 // step size (in m/z) to use for profile generation from the raw data files
  center_align_N1_neg_xcms = 'NULL' // the index of the sample all others will be aligned to. If center = NULL, the sample with the most peaks is chosen as default.
  response_align_N1_neg_xcms = 1// Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  distFunc_align_N1_neg_xcms = 'cor_opt' //DistFunc function: cor (Pearson's R) or cor_opt (default, calculate only 10% diagonal band of distance matrix, better runtime), cov (covariance), prd (product), euc (Euclidean distance)
  gapInit_align_N1_neg_xcms = 'NULL' //Penalty for Gap opening
  gapExtend_align_N1_neg_xcms = 'NULL' //Penalty for Gap enlargement
  factorDiag_align_N1_neg_xcms = 2 //Local weighting applied to diagonal moves in alignment.
  factorGap_align_N1_neg_xcms = 1 //Local weighting applied to gap moves in alignment.
  localAlignment_align_N1_neg_xcms = 0 //Local rather than global alignment

  // group peaks Number 1 negative
  bandwidth_group_N1_neg_xcms = 15 // bandwidth (consider something like retention time differences)
  mzwid_group_N1_neg_xcms = 0.005 // mz width (mz differences)
  minfrac_group_N1_neg_xcms = 0.5// minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  minsamp_group_N1_neg_xcms = 1 // minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  max_group_N1_neg_xcms = 50 // maximum number of groups to identify in a single m/z slice

  masstrace_ppm_neg_xcms = 10 // masstrance deviation in ppm
  peakwidthlow_quant_neg_xcms = 5 // lower width of peaks
  peakwidthhigh_quant_neg_xcms = 30 // highest width of peaks
  noise_quant_neg_xcms = 1000 // level of noise
  phenodatacolumn_quant_neg = 'Class' // name of the column in the phenotype_design_neg showing class information of the samples
  sampleclass_quant_neg_xcms = 'Sample' // A name for the class of sample

  // group peaks Number 1 negative
  bandwidth_group_N1_neg_xcms = 15 // bandwidth (consider something like retention time differences)
  mzwid_group_N1_neg_xcms = 0.005 // mz width (mz differences)

  // filtering parameters

  // blank filtering
  blank_filter_neg = false // set to true if you want to remove signal from blan
  method_blankfilter_neg_xcms = 'max' // method of sumarization of signal in blank samples
  blank_blankfilter_neg_xcms = 'Blank' // Name of the class of the blank samples
  sample_blankfilter_neg_xcms = 'Sample' // Name of the class of the biological samples
  rest_blankfilter_neg_xcms = 'T' // set to T to compare blanks only to rest of the samples

  // dilution filtering
  dilution_filter_neg = false
  corto_dilutionfilter_neg_xcms = '0.5,1,2,4' // the sequence of you dilution serie. For example if you have been adding double the concentration every time. This has to be separated by comma!
  dilution_dilutionfilter_neg_xcms = 'D1,D2,D3,D4' // The class of the samples represneting dilution. This has to be separated by comma!
  pvalue_dilutionfilter_neg_xcms = 0.05 // p-value of the correlation. Anything higher than this will be removed!
  corcut_dilutionfilter_neg_xcms = -1 // minimum expected correlation. Aniything lower than this will be removed!
  abs_dilutionfilter_neg_xcms = 'F' // If the tool should consider absolute correlation rather than the typical one from [-1 to 1]

  // cv filtering
  cv_filter_neg = false
  qc_cvfilter_neg_xcms = 'QC' // class of your QC samples
  cvcut_cvfilter_neg_xcms = 0.3 // Maximum coefficient of variation you expect. Anything higher than this will be removed!

  // camera parameters

  // Camera group
  sigma_group_neg_camera = 8 // sigma value for grouping the peaks across chromatogram
  perfwhm_group_neg_camera = 0.6 // full width at half maximum for finding overlaping peaks
  intval_group_neg_camera = 'maxo' // which intensity value to use

  // camera find adducts
  ppm_findaddcuts_neg_camera = 10 // ppm deviation between theoritical adduct mass and the experimental one
  polarity_findaddcuts_neg_camera = 'negative' // this has to be negative (for testing only)!

  // camera find isotopes
  maxcharge_findisotopes_neg_camera = 1 // number of changes to consider (most often 1 is enough)

  // Identification parameters

  // Mapping MS2 ions to mass traces
  ppm_mapmsmstocamera_neg_msnbase = 10 // ppm deviation when mapping MS2 parent ion to a mass trace
  rt_mapmsmstocamera_neg_msnbase = 5 // rt difference (in second) for mapping MS2 parent ion to a mass trace (the mass trace is a range, star and end of the trace)

  // global search Engine parameters

  precursorppm_msmstoparam_neg_msnbase = 10 // relative mass tolerance of the precursor (ppm)
  fragmentppm_msmstoparam_neg_msnbase = 20 // relative mass tolerance of the fragment ions (ppm)
  fragmentabs_msmstoparam_neg_msnbase = 0.05 // absolute mass tolerance of the fragment ions
  database_msmstoparam_neg_msnbase = 'LocalCSV' // type of database to use
  mode_msmstoparam_neg_msnbase = 'pos' // ionization method. This has to be pos (only for testing at this stage)
  adductRules_msmstoparam_neg_msnbase = 'primary' // adduct rules (primary or extended)
  minPeaks_msmstoparam_neg_msnbase = 2 // ions with less that this number will be removed

  // CSI:FINGERID parameters
  database_csifingerid_neg_csifingerid = 'hmdb' // IMPORTANT: we don't support database file for csi:fingerid. You will need to provide what database to use here, the rest of the parameters will be taken from there parameter file
  ncore_csifingerid_neg_csifingerid = 2 // number of cores that csi can use
  timeout_csifingerid_neg_csifingerid = 600 // number of seconds that each csi ion can rum (time limit)

  // MetFrag
  database_csv_files_neg_metfrag = '' // path to a csv file containing your database
  ncore_neg_metfrag = 2 // number of cores that metfrag can use

  // CFM-ID
  database_csv_files_neg_cfmid = '' // path to a csv file containing your database
  ncore_neg_cfmid = 2 // number of cores that cfm can use

  candidate_id_identification_neg_cfmid = 'Identifier' // name of the column in the database for id of the molecules
  candidate_inchi_smiles_identification_neg_cfmid = 'SMILES' // name of the column in the database for smile of the molecules
  candidate_mass_identification_neg_cfmid = 'MonoisotopicMass' // name of the column in the database for mass of the molecules
  database_name_column_identification_neg_cfmid = 'Name' // name of the column in the database for name of the molecules
  database_inchI_column_identification_neg_cfmid = 'InChI' // name of the column in the database for inchi of the molecules

  // output options
  ppm_output_neg_camera = 10 // relative difference of mass of the ID hit compare to a mass trace (ppm)
  rt_output_neg_camera = 5 // retention time difference of ID to mass trace (second)
  higher_the_better_output_neg_camera = true // is higher the score the better (not used for now)
  impute_output_neg_camera = true // should we impute adduct and different chance states with the same ID
  type_column_output_neg_camera = 'Class' // Class of the samples (used for statistics and coverage calculations)
  selected_type_output_neg_camera = 'Sample' // what class of samples do you want to keep (anything not matching this in the Class column will be removed)
  rename_output_neg_camera = true // you want to rename the files
  rename_col_output_neg_camera = 'rename' // which column of the phenotype file to use for renaming
  only_report_with_id_output_neg_camera = false // do only want to see the identified mass traces or everything?
  combine_replicate_output_neg_camera = false // do you have technical replicates you want to average ?
  combine_replicate_column_output_neg_camera = 'rep' // which column of the phenotype file show the technical replicates
  log_output_neg_camera = true // should we log2 the output
  sample_coverage_output_neg_camera = 50 // any mass trace having more pecentage of the missing value will be removed
  sample_coverage_method_output_neg_camera = 'global' // how to calculate missing value percentrage? global across all the samples? or name of the column in the phenotype file showing the grouping
  ncore_output_neg_camera = 1 // number of cores used for mapping the features
  normalize_output_neg_camera = '1' // do you want to normalize the data set to 'NA' if you don't want noremalization

  // library paramteres
  raw_file_name_preparelibrary_neg_msnbase = 'rawFile' // name of the column showing which raw files contain which metabolite in the library_description_neg csv file
  compund_id_preparelibrary_neg_msnbase = 'HMDB.YMDB.ID' // name of the column showing id of the metabolites in the library_description_neg csv file
  compound_name_preparelibrary_neg_msnbase = 'PRIMARY_NAME' // name of the compount column in the library_description_neg csv file
  mz_col_preparelibrary_neg_msnbase = 'mz' // name of the mz column in the library_description_neg csv file
  which_mz_preparelibrary_neg_msnbase = 'f' // "f" or "c", showing whether the Feature range or centroid of the feature should be used for mapping
  ncore_searchengine_library_neg_msnbase = 1 // Number of cores for mapping the features
  ppm_create_library_neg_msnbase = 10 // ppm error for mapping the library characterization masses to the experimental one

  // XCMS library negative parameters
  // IPO settings (if you don't want to optimize a particular parameter, set both lower and higher to the same value)
  performIPO_library_neg = 'none' // controls how to perform IPO possible values: "none": don't perform IPO, "global": performs IPO on all or selected number of samples. "local": performs IPO on individual samples one at the time.

  // IPO quantification settings (only needed if selected to do quantification optimization)
  ipo_methodXset_library_neg = 'centWave' // Quantification methods for IPO. Only centWave is supported at this stage.
  ipo_noise_l_library_neg = 0 // lowest level of noise
  ipo_noise_h_library_neg = 0 // highest level of noise
  ipo_snthresh_l_library_neg = 10 // lowest level of signal to noise threshold
  ipo_snthresh_h_library_neg = 10 // highest level of signal to noise threshold
  ipo_mzCenterFun_library_neg = 'wMean' // Function for centering the mz
  ipo_integrate_library_neg = 1 // Integration method. If ' = 1' peak limits are found through descent on the mexican hat filtered data, if ' = 2' the descent is done on the real data. Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact.
  ipo_fitgauss_library_neg = false // logical, if TRUE a Gaussian is fitte
  ipo_min_peakwidth_l_library_neg = 12 // lower minimum width of peaks
  ipo_min_peakwidth_h_library_neg = 28 // higher minimum width of peaks
  ipo_max_peakwidth_l_library_neg = 35 // lower maximum width of peaks
  ipo_max_peakwidth_h_library_neg = 65 // higher maximum width of peaks
  ipo_ppm_l_library_neg = 17 // lower ppm mass deviation
  ipo_ppm_h_library_neg = 32 // higher ppm mass deviation
  ipo_mzdiff_l_library_neg = -0.001 // lowerminimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  ipo_mzdiff_h_library_neg = 0.010 // higher minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  ipo_charge_camera_library_neg = 1 // maximum charge of molecules (only used in individual setting)
  ipo_max_ppm_camera_library_neg = 10 // ppm mass deviation for adducts (only used in individual setting)
  ipo_prefilter_l_l_library_neg = 3 // lower value of K in 'prefilter_library_neg = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity >_library_neg = 'I'.
  ipo_prefilter_l_h_library_neg = 3 // higher value of K in 'prefilter_library_neg = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity >_library_neg = 'I'.
  ipo_prefilter_h_l_library_neg = 100 // lower I in prefilter
  ipo_prefilter_h_h_library_neg = 100 // higher I in prefilter
  ipo_ncores_library_neg = 5 // number of cores used in IPO

  // IPO RT and group settings (only needed if selected to do RT and group optimization)
  ipo_gapInit_l_library_neg = 0.0 // lower Penalty for Gap opening
  ipo_gapInit_h_library_neg = 0.4 // higher Penalty for Gap opening
  ipo_gapExtend_l_library_neg = 2.1 // lower Penalty for Gap enlargement
  ipo_gapExtend_h_library_neg = 2.7 // higher Penalty for Gap enlargement
  ipo_profStep_l_library_neg = 0.7 // lower step size (in m/z) to use for profile generation from the raw data files
  ipo_profStep_h_library_neg = 1.0 // higher step size (in m/z) to use for profile generation from the raw data files
  ipo_response_l_library_neg = 1 // lower Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  ipo_response_h_library_neg = 1 // higher Responsiveness of warping.  0 will give a linear warp based on start and end points.  100 will use all bijective anchors
  ipo_factorDiag_l_library_neg = 2 // lower Local weighting applied to diagonal moves in alignment.
  ipo_factorDiag_h_library_neg = 2 // higher Local weighting applied to diagonal moves in alignment.
  ipo_factorGap_l_library_neg = 1 // lower Local weighting applied to gap moves in alignment.
  ipo_factorGap_h_library_neg = 1 // higher Local weighting applied to gap moves in alignment.
  ipo_localAlignment_library_neg = 0 //Local rather than global alignment
  ipo_bw_l_library_neg = 22 // lower bandwidth (consider something like retention time differences)
  ipo_bw_h_library_neg = 38 // higher bandwidth (consider something like retention time differences)
  ipo_minfrac_l_library_neg = 0.3 // lower minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_minfrac_h_library_neg = 0.7 // higher minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_mzwid_l_library_neg = 0.015 // lower mz width (mz differences)
  ipo_mzwid_h_library_neg = 0.035 // higher mz width (mz differences)
  ipo_minsamp_l_library_neg = 1 // lower minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_minsamp_h_library_neg = 1 // higher minimum number of samples necessary in at least one of the sample groups for it to be a valid group
  ipo_max_l_library_neg = 50 // lower maximum number of groups to identify in a single m/z slice
  ipo_max_h_library_neg = 50 // higher maximum number of groups to identify in a single m/z slice
  ipo_distFunc_library_neg = 'cor_opt' // DistFunc function: cor (Pearson's R) or cor_opt (default, calculate only 10% diagonal band of distance matrix, better runtime), cov (covariance), prd (product), euc (Euclidean distance)
  ipo_methodRT_library_neg = 'obiwarp' // Only obiwarp is supported

  // XCMS library negative parameters
  masstrace_ppm_library_neg_xcms = 10 // masstrance deviation in ppm
  peakwidthlow_quant_library_neg_xcms = 5 // lower width of peaks
  peakwidthhigh_quant_library_neg_xcms = 30 // highest width of peaks
  noise_quant_library_neg_xcms = 1000 // level of noise
  mzdiff_quant_library_neg_xcms = -0.001 //minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap
  snthresh_quant_library_neg_xcms = 10 // signal to noise ratio cutoff, definition see below.
  prefilter_quant_library_neg_xcms = 3 // K in 'prefilter = c(k,I)'. Prefilter step for the first phase. Mass traces are only retained if they contain at least 'k' peaks with intensity > = 'I'.
  value_of_prefilter_quant_library_neg_xcms = 100 // I in prefilter
  mzCenterFun_quant_library_neg_xcms = 'wMean' // Function to calculate the m/z center of the feature: 'wMean' intensity weighted mean of the feature m/z values, 'mean' mean of the feature m/z values, 'apex' use m/z value at peak apex, 'wMeanApex3' intensity weighted mean of the m/z value at peak apex and the m/z value left and right of it, 'meanApex3' mean of the m/z value at peak apex and the m/z value left and right of it.
  integrate_quant_library_neg_xcms = 1 // Integration method. If ' = 1' peak limits are found through descent on the mexican hat filtered data, if ' = 2' the descent is done on the real data. Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact.
  fitgauss_quant_library_neg_xcms = false // logical, if TRUE a Gaussian is fitte
  phenodatacolumn_quant_library_neg = 'Class' // name of the column in the phenotype_design_library_neg showing class information of the samples
  sampleclass_quant_library_neg_xcms = 'Sample' // A name for the class of sample

  // group library camera
  sigma_group_library_neg_camera = 8 // sigma value for grouping the peaks across chromatogram
  perfwhm_group_library_neg_camera = 0.6 // full width at half maximum for finding overlaping peaks
  intval_group_library_neg_camera = 'maxo' // which intensity value to use

  // find adduct library pos
  ppm_findaddcuts_library_neg_camera = 10 // ppm deviation between theoritical adduct mass and the experimental one
  polarity_findaddcuts_library_neg_camera = 'negative' // this has to be negative (for testing only)!

  // camera find isotopes library pos
  maxcharge_findisotopes_library_neg_camera = 1 // number of changes to consider (most often 1 is enough)

  // Mapping MS2 ions to mass traces library pos
  ppm_mapmsmstocamera_library_neg_msnbase = 10 // ppm deviation when mapping MS2 parent ion to a mass trace
  rt_mapmsmstocamera_library_neg_msnbase = 5 // rt difference (in second) for mapping MS2 parent ion to a mass trace (the mass trace is a range, star and end of the trace)

}
