<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE knimeNode PUBLIC "-//UNIKN//DTD KNIME Node 2.0//EN" "http://www.knime.org/Node.dtd">
<knimeNode icon="generic_node.png" type="Manipulator">
    <name>OpenSwathRTNormalizer</name>
    
    <shortDescription>
        This tool will take a description of RT peptides and their normalized retention time to write out a transformation file on how to transform the RT space into the normalized space.
    </shortDescription>
    
    <fullDescription>
        <intro><p>This tool will take a description of RT peptides and their normalized retention time to write out a transformation file on how to transform the RT space into the normalized space.</p>
		<p>
			<a href="http://ftp.mi.fu-berlin.de/OpenMS/release-documentation/html/TOPP_OpenSwathRTNormalizer.html">Web Documentation for OpenSwathRTNormalizer</a>
		</p>

        </intro>
        
		<option name="version">Version of the tool that generated this parameters file.</option>
		<option name="min_rsq">Minimum r-squared of RT peptides regression</option>
		<option name="min_coverage">Minimum relative amount of RT peptides to keep</option>
		<option name="estimateBestPeptides">Whether the algorithms should try to choose the best peptides based on their peak shape for normalization. Use this option you do not expect all your peptides to be detected in a sample and too many 'bad' peptides enter the outlier removal step (e.g. due to them being endogenous peptides or using a less curated list of peptides).</option>
		<option name="log">Name of log file (created only when specified)</option>
		<option name="debug">Sets the debug level</option>
		<option name="threads">Sets the number of threads allowed to be used by the TOPP tool</option>
		<option name="no_progress">Disables progress logging to command line</option>
		<option name="force">Overwrite tool specific checks.</option>
		<option name="test">Enables the test mode (needed for internal use only)</option>
		<option name="stop_report_after_feature">Stop reporting after feature (ordered by quality; -1 means do not stop).</option>
		<option name="rt_extraction_window">Only extract RT around this value (-1 means extract over the whole range, a value of 500 means to extract around +/- 500 s of the expected elution). For this to work, the TraML input file needs to contain normalized RT values.</option>
		<option name="rt_normalization_factor">The normalized RT is expected to be between 0 and 1. If your normalized RT has a different range, pass this here (e.g. it goes from 0 to 100, set this value to 100)</option>
		<option name="quantification_cutoff">Cutoff in m/z below which peaks should not be used for quantification any more</option>
		<option name="write_convex_hull">Whether to write out all points of all features into the featureXML</option>
		<option name="add_up_spectra">Add up spectra around the peak apex (needs to be a non-even integer)</option>
		<option name="spacing_for_spectra_resampling">If spectra are to be added, use this spacing to add them up</option>
		<option name="uis_threshold_sn">S/N threshold to consider identification transition (set to -1 to consider all)</option>
		<option name="uis_threshold_peak_area">Peak area threshold to consider identification transition (set to -1 to consider all)</option>
		<option name="stop_after_feature">Stop finding after feature (ordered by intensity; -1 means do not stop).</option>
		<option name="stop_after_intensity_ratio">Stop after reaching intensity ratio</option>
		<option name="min_peak_width">Minimal peak width (s), discard all peaks below this value (-1 means no action).</option>
		<option name="background_subtraction">Try to apply a background subtraction to the peak (experimental). The background is estimated at the peak boundaries, either the smoothed or the raw chromatogram data can be used for that.</option>
		<option name="recalculate_peaks">Tries to get better peak picking by looking at peak consistency of all picked peaks. Tries to use the consensus (median) peak border if theof variation within the picked peaks is too large.</option>
		<option name="recalculate_peaks_max_z">Determines the maximal Z-Score (difference measured in standard deviations) that is considered too large for peak boundaries. If the Z-Score is above this value, the median is used for peak boundaries (default value 1.0).</option>
		<option name="minimal_quality">Only if compute_peak_quality is set, this parameter will not consider peaks below this quality threshold</option>
		<option name="compute_peak_quality">Tries to compute a quality value for each peakgroup and detect outlier transitions. The resulting score is centered around zero and values above 0 are generally good and below -1 or -2 are usually bad.</option>
		<option name="sgolay_frame_length">The number of subsequent data points used for smoothing.
This number has to be uneven. If it is not, 1 will be added.</option>
		<option name="sgolay_polynomial_order">Order of the polynomial that is fitted.</option>
		<option name="gauss_width">Gaussian width in seconds, estimated peak size.</option>
		<option name="use_gauss">Use Gaussian filter for smoothing (alternative is Savitzky-Golay filter)</option>
		<option name="peak_width">Force a certain minimal peak_width on the data (e.g. extend the peak at least by this amount on both sides) in seconds. -1 turns this feature off.</option>
		<option name="signal_to_noise">Signal-to-noise threshold at which a peak will not be extended any more. Note that setting this too high (e.g. 1.0) can lead to peaks whose flanks are not fully captured.</option>
		<option name="sn_win_len">Signal to noise window length.</option>
		<option name="sn_bin_count">Signal to noise bin count.</option>
		<option name="write_sn_log_messages">Write out log messages of the signal-to-noise estimator in case of sparse windows or median in rightmost histogram bin</option>
		<option name="remove_overlapping_peaks">Try to remove overlapping peaks during peak picking</option>
		<option name="method">Which method to choose for chromatographic peak-picking (OpenSWATH legacy, corrected picking or Crawdad).</option>
		<option name="dia_extraction_window">DIA extraction window in Th.</option>
		<option name="dia_centroided">Use centroded DIA data.</option>
		<option name="dia_byseries_intensity_min">DIA b/y series minimum intensity to consider.</option>
		<option name="dia_byseries_ppm_diff">DIA b/y series minimal difference in ppm to consider.</option>
		<option name="dia_nr_isotopes">DIA nr of isotopes to consider.</option>
		<option name="dia_nr_charges">DIA nr of charges to consider.</option>
		<option name="peak_before_mono_max_ppm_diff">DIA maximal difference in ppm to count a peak at lower m/z when searching for evidence that a peak might not be monoisotopic.</option>
		<option name="interpolation_step">Sampling rate for the interpolation of the model function.</option>
		<option name="tolerance_stdev_bounding_box">Bounding box has range [minimim of data, maximum of data] enlarged by tolerance_stdev_bounding_box times the standard deviation of the data.</option>
		<option name="max_iteration">Maximum number of iterations using by Levenberg-Marquardt algorithm.</option>
		<option name="mean">Centroid position of the model.</option>
		<option name="variance">Variance of the model.</option>
		<option name="use_shape_score">Use the shape score (this score measures the similarity in shape of the transitions using a cross-correlation)</option>
		<option name="use_coelution_score">Use the coelution score (this score measures the similarity in coelution of the transitions using a cross-correlation)</option>
		<option name="use_rt_score">Use the retention time score (this score measure the difference in retention time)</option>
		<option name="use_library_score">Use the library score</option>
		<option name="use_elution_model_score">Use the elution model (EMG) score (this score fits a gaussian model to the peak and checks the fit)</option>
		<option name="use_intensity_score">Use the intensity score</option>
		<option name="use_nr_peaks_score">Use the number of peaks score</option>
		<option name="use_total_xic_score">Use the total XIC score</option>
		<option name="use_sn_score">Use the SN (signal to noise) score</option>
		<option name="use_dia_scores">Use the DIA (SWATH) scores</option>
		<option name="use_ms1_correlation">Use the correlation scores with the MS1 elution profiles</option>
		<option name="use_ms1_fullscan">Use the full MS1 scan at the peak apex for scoring (ppm accuracy of precursor and isotopic pattern)</option>
		<option name="use_uis_scores">Use UIS scores for peptidoform identification </option>
		<option name="outlierMethod">Which outlier detection method to use (valid: 'iter_residual', 'iter_jackknife', 'ransac', 'none'). Iterative methods remove one outlier at a time. Jackknife approach optimizes for maximum r-squared improvement while 'iter_residual' removes the datapoint with the largest residual error (removal by residual is computationally cheaper, use this with lots of peptides).</option>
		<option name="useIterativeChauvenet">Whether to use Chauvenet's criterion when using iterative methods. This should be used if the algorithm removes too many datapoints but it may lead to true outliers being retained.</option>
		<option name="RANSACMaxIterations">Maximum iterations for the RANSAC outlier detection algorithm.</option>
		<option name="RANSACMaxPercentRTThreshold">Maximum threshold in RT dimension for the RANSAC outlier detection algorithm (in percent of the total gradient). Default is set to 3% which is around +/- 4 minutes on a 120 gradient.</option>
		<option name="RANSACSamplingSize">Sampling size of data points per iteration for the RANSAC outlier detection algorithm.</option>
		<option name="InitialQualityCutoff">The initial overall quality cutoff for a peak to be scored (range ca. -2 to 2)</option>
		<option name="OverallQualityCutoff">The overall quality cutoff for a peak to go into the retention time estimation (range ca. 0 to 10)</option>
		<option name="NrRTBins">Number of RT bins to use to compute coverage. This option should be used to ensure that there is a complete coverage of the RT space (this should detect cases where only a part of the RT gradient is actually covered by normalization peptides)</option>
		<option name="MinPeptidesPerBin">Minimal number of peptides that are required for a bin to counted as 'covered'</option>
		<option name="MinBinsFilled">Minimal number of bins required to be covered</option>

    </fullDescription>
    
    <ports>
		<inPort index="0" name="in [mzML]">Input files separated by blank [mzML]</inPort>
		<inPort index="1" name="tr [csv,traML]">transition file with the RT peptides ('TraML' or 'csv') [csv,traML]</inPort>
		<inPort index="2" name="rt_norm [trafoXML]">RT normalization file (how to map the RTs of this run to the ones stored in the library) [trafoXML,opt.]</inPort>
		<outPort index="0" name="out [trafoXML]">output file [trafoXML]</outPort>
 </ports>
    <views>
        <view index="0" name="OpenSwathRTNormalizer Std Output">The text sent to standard out during the execution of OpenSwathRTNormalizer.</view>
        <view index="1" name="OpenSwathRTNormalizer Error Output">The text sent to standard error during the execution of OpenSwathRTNormalizer. (If it appears in gray, it's the output of a previously failing run which is preserved for your trouble shooting.)</view>
    </views>    
</knimeNode>
