diff abims_xcms_group.xml @ 29:020d065edd9e draft

planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
author lecorguille
date Thu, 01 Mar 2018 04:16:06 -0500
parents a18fc7554c6d
children f248fd3b89d6
line wrap: on
line diff
--- a/abims_xcms_group.xml	Tue Feb 13 04:43:21 2018 -0500
+++ b/abims_xcms_group.xml	Thu Mar 01 04:16:06 2018 -0500
@@ -1,6 +1,6 @@
-<tool id="abims_xcms_group" name="xcms.group" version="2.1.1">
+<tool id="abims_xcms_group" name="xcms groupChromPeaks (group)" version="@WRAPPER_VERSION@.0">
 
-    <description>Group peaks together across samples using overlapping m/z bins and calculation of smoothed peak distributions in chromatographic time.</description>
+    <description>Perform the correspondence, the grouping of chromatographic peaks within and between samples.</description>
 
     <macros>
         <import>macros.xml</import>
@@ -10,277 +10,258 @@
     <expand macro="stdio"/>
 
     <command><![CDATA[
-        @COMMAND_XCMS_SCRIPT@
-        xfunction group
+        @COMMAND_XCMS_SCRIPT@/xcms_group.r
         image '$image'
 
-        xsetRdataOutput '$xsetRData'
-        rplotspdf '$rplotsPdf'
-
         method $methods.method
-        #if $methods.method == "density":
-            ## minsamp $methods.minsamp
-            minfrac $methods.minfrac
+        #if $methods.method == "PeakDensity":
             bw $methods.bw
-            mzwid $methods.mzwid
-            sleep 0.001
-        #if $methods.density_options.option == "show":
-            max $methods.density_options.max
-        #end if
-        #elif $methods.method == "mzClust":
-            mzppm $methods.mzppm
-            mzabs $methods.mzabs
-            minfrac $methods.minfrac
-            ## minsamp $methods.minsamp
+            minFraction $methods.minFraction
+            minSamples $methods.minSamples
+            binSize $methods.binSize
+            ## Advanced
+            maxFeatures $methods.PeakDensityAdv.maxFeatures
+        #elif $methods.method == "MzClust":
+            ppm $methods.ppm
+            absMz $methods.absMz
+            minFraction $methods.minFraction
+            minSamples $methods.minSamples
         #else:
-            mzVsRTbalance $methods.mzVsRTbalance
-            mzCheck $methods.mzCheck
-            rtCheck $methods.rtCheck
+            mzVsRtBalance $methods.mzVsRtBalance
+            absMz $methods.absMz
+            absRt $methods.absRt
             kNN $methods.kNN
         #end if
 
         @COMMAND_PEAKLIST@
 
+        @COMMAND_FILE_LOAD@
+
         @COMMAND_LOG_EXIT@
    ]]></command>
 
     <inputs>
         <param name="image" type="data" format="rdata.xcms.raw,rdata.xcms.group,rdata.xcms.retcor,rdata" label="xset RData file" help="output file from another function xcms (xcmsSet, retcor etc.)" />
         <conditional name="methods">
-            <param name="method" type="select" label="Method to use for grouping" help="[method] See the help section below">
-                <option value="density" selected="true">density</option>
-                <option value="mzClust" >mzClust</option>
-                <option value="nearest" >nearest</option>
+            <param name="method" type="select" label="Method to use for grouping" help="See the help section below">
+                <option value="PeakDensity" selected="true">PeakDensity - peak grouping based on time dimension peak densities</option>
+                <option value="MzClust">MzClust - high resolution peak grouping for single spectra (direct infusion) MS data</option>
+                <option value="NearestPeaks">NearestPeaks - chromatographic peak grouping based on their proximity in the mz-rt space</option>
             </param>
-            <when value="density">
-                <param name="bw" type="float" value="30" label="Bandwidth" help="[bw] bandwidth (standard deviation or half width at half maximum) of gaussian smoothing kernel to apply to the peak density chromatogram" />
-                <param name="minfrac" type="float" value="0.5" label="Minimum fraction of samples necessary" help="[minfrac] in at least one of the sample groups for it to be a valid group" />
-                <param name="mzwid" type="float" value="0.25" label="Width of overlapping m/z slices" help="[mzwid] to use for creating peak density chromatograms and grouping peaks across samples " />
-<!--
-                <param name="minsamp" type="hidden" value="1" label="minsamp" help="minimum number of samples necessary in at least one of the sample groups for it to be a valid group " />
--->
-            <conditional name="density_options">
-            <param name="option" type="select" label="Advanced options">
-                <option value="show">show</option>
-                <option value="hide" selected="true">hide</option>
-            </param>
-            <when value="show">
-                <param name="max" type="integer" value="50" label="Maximum number of groups to identify in a single m/z slice" help="[max]" />
+            <when value="PeakDensity">
+                <param argument="bw" type="float" value="30" label="Bandwidth" help="bandwidth (standard deviation or half width at half maximum) of gaussian smoothing kernel to apply to the peak density chromatogram" />
+                <param argument="minFraction" type="float" value="0.5" label="Minimum fraction of samples" help="in at least one sample group in which the peaks have to be present to be considered as a peak group (feature)" />
+                <param argument="minSamples" type="integer" value="1" label="Minimum number of samples" help="in at least one sample group in which the peaks have to be detected to be considered a peak group (feature)" />
+                <param argument="binSize" type="float" value="0.25" label="Width of overlapping m/z slices" help="to use for creating peak density chromatograms and grouping peaks across samples (previously mzdiff)" />
+
+                <section name="PeakDensityAdv" title="Advanced Options" expanded="False">
+                    <param argument="maxFeatures" type="integer" value="50" label="Maximum number of groups to identify in a single m/z slice" />
+                </section>
             </when>
-            <when value="hide">
+            <when value="MzClust">
+                <param argument="ppm" type="integer" value="20" label="Relative mz error for clustering/grouping in ppm" />
+                <param argument="absMz" type="float" value="0" label="Absolute mz error for clustering/grouping" />
+                <param argument="minFraction" type="float" value="0.5" label="Minimum fraction of samples" help="in at least one sample group in which the peaks have to be present to be considered as a peak group (feature)" />
+                <param argument="minSamples" type="integer" value="1" label="Minimum number of samples" help="in at least one sample group in which the peaks have to be detected to be considered a peak group (feature)" />
+            </when>
+            <when value="NearestPeaks">
+                <param argument="mzVsRtBalance" type="integer" value="10" label="Factor by which mz values are multiplied before calculating the (euclician) distance between two peaks" />
+                <param argument="absMz" type="float" value="0.2" label="Maximum tolerated distance for mz values" />
+                <param argument="absRt" type="integer" value="15" label="Maximum tolerated distance for RT values" />
+                <param argument="kNN" type="integer" value="10" label="Number of nearest Neighbours to check" />
             </when>
         </conditional>
 
-            </when>
-            <when value="mzClust">
-                <param name="mzppm" type="integer" value="20 " label="Relative error used for clustering/grouping in ppm" help="[mzppm]" />
-                <param name="mzabs" type="float" value="0" label="Absolute error used for clustering/grouping" help="[mzabs]" />
-                <param name="minfrac" type="float" value="0" label="Minimum fraction of each class in one bin" help="[minfrac] minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group" />
-<!--
-                <param name="minsamp" type="hidden" value="1" label="minsamp" help="minimum number of samples necessary in at least one of the sample groups for it to be a valid group " />
--->
-            </when>
-            <when value="nearest">
-                <param name="mzVsRTbalance" type="integer" value="10 " label="Multiplicator for mz value before calculating the (euclidean) distance between two peaks." help="[mzVsRTbalance]" />
-                <param name="mzCheck" type="float" value="0.2" label="Maximum tolerated distance for mz" help="[mzCheck]" />
-                <param name="rtCheck" type="integer" value="15" label="Maximum tolerated distance for RT" help="[rtCheck]" />
-                <param name="kNN" type="integer" value="10" label="Number of nearest Neighbours to check" help="[kNN]" />
-            </when>
-        </conditional>
-<!--
-        <param name="sleepy" type="float" value="0.001" label="sleep" help="seconds to pause between plotting successive steps of the peak grouping algorithm. peaks are plotted as points showing relative intensity. identified groups are flanked by dotted vertical lines">
-            <validator type="in_range" message="Must be more than 0" min="0.001" max="inf"/>
-        </param>
--->
+        <expand macro="input_peaklist"/>
 
-        <expand macro="input_peaklist"/>
+        <expand macro="input_file_load"/>
     </inputs>
 
     <outputs>
-        <data name="xsetRData" format="rdata.xcms.group" label="${image.name[:-6]}.group.RData"/>
-        <data name="rplotsPdf" format="pdf" label="${image.name[:-6]}.group.Rplots.pdf"/>
+        <data name="xsetRData" format="rdata.xcms.group" label="${image.name[:-6]}.group.RData" from_work_dir="group.RData"/>
+        <data name="plotChromPeakDensity" format="pdf" label="${image.name[:-6]}.group.plotChromPeakDensity.pdf" from_work_dir="plotChromPeakDensity.pdf"/>
         <expand macro="output_peaklist" function="group"/>
-        <data name="log" format="txt" label="xset.log.txt"  hidden="true" />
     </outputs>
 
     <tests>
-        <!--<test>
-            <param name="image" value="xset.RData"/>
-            <param name="methods|method" value="density"/>
-            <param name="methods|bw" value="5"/>
-            <param name="methods|minfrac" value="0.3"/>
-            <param name="methods|mzwid" value="0.01"/>
-            <param name="methods|density_options|option" value="show"/>
-            <param name="methods|density_options|max" value="50"/>
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 4 samples" />
-                    <has_text text="Time range: 0.7-1139.7 seconds (0-19 minutes)" />
-                    <has_text text="Mass range: 50.0021-999.9863 m/z" />
-                    <has_text text="Peaks: 59359 (about 14840 per sample)" />
-                    <has_text text="Peak Groups: 48998" />
-                    <has_text text="Sample classes: bio, blank" />
-                </assert_contents>
-            </output>
-        </test>-->
+        <!-- from xcmsSet -->
         <test>
-            <param name="image" value="faahKO.xset.RData"/>
-            <param name="methods|method" value="density"/>
-            <param name="methods|bw" value="5"/>
-            <param name="methods|minfrac" value="0.3"/>
-            <param name="methods|mzwid" value="0.01"/>
-            <param name="methods|density_options|option" value="show"/>
-            <param name="methods|density_options|max" value="50"/>
+            <param name="image" value="faahKO-single-class.xset.merged.RData"/>
+            <conditional name="methods">
+                <param name="method" value="PeakDensity"/>
+                <param name="bw" value="5"/>
+                <param name="minFraction" value="0.3"/>
+                <param name="binSize" value="0.01"/>
+                <section name="PeakDensityAdv">
+                    <param name="maxFeatures" value="50"/>
+                </section>
+            </conditional>
             <conditional name="peaklist">
+                <param name="peaklistBool" value="true" />
                 <param name="convertRTMinute" value="false" />
-                <param name="peaklistBool" value="true" />
                 <param name="numDigitsMZ" value="4" />
                 <param name="numDigitsRT" value="1" />
             </conditional>
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 4 samples" />
-                    <has_text text="Time range: 2506.1-4477.9 seconds (41.8-74.6 minutes)" />
-                    <has_text text="Mass range: 200.1-600 m/z" />
-                    <has_text text="Peaks: 9251 (about 2313 per sample)" />
-                    <has_text text="Peak Groups: 8275" />
-                    <has_text text="Sample classes: KO, WT" />
-                </assert_contents>
-            </output>
+            <expand macro="test_file_load_single"/>
+            <assert_stdout>
+                <has_text text="bw: 5" />
+                <has_text text="minFraction: 0.3" />
+                <has_text text="maxFeatures: 50" />
+                <has_text text="object with 4 samples" />
+                <has_text text="Time range: 2506.1-4477.9 seconds (41.8-74.6 minutes)" />
+                <has_text text="Mass range: 200.1-600 m/z" />
+                <has_text text="Peaks: 9251 (about 2313 per sample)" />
+                <has_text text="Peak Groups: 8372" />
+                <has_text text="Sample classes: KO, WT" />
+            </assert_stdout>
             <output name="variableMetadata" file="faahKO.xset.group.variableMetadata.tsv" />
             <output name="dataMatrix" file="faahKO.xset.group.dataMatrix.tsv" />
         </test>
+        <!-- DISABLE FOR TRAVIS
         <test>
-            <param name="image" value="faahKO-single-class.xset.merged.RData"/>
-            <param name="methods|method" value="density"/>
-            <param name="methods|bw" value="5"/>
-            <param name="methods|minfrac" value="0.3"/>
-            <param name="methods|mzwid" value="0.01"/>
-            <param name="methods|density_options|option" value="show"/>
-            <param name="methods|density_options|max" value="50"/>
+            <param name="image" value="faahKO-single.xset.merged.RData"/>
+            <conditional name="methods">
+                <param name="method" value="PeakDensity"/>
+                <param name="bw" value="5"/>
+                <param name="minFraction" value="0.3"/>
+                <param name="binSize" value="0.01"/>
+                <conditional name="density_options">
+                    <param name="option" value="show"/>
+                    <param name="maxFeatures" value="50"/>
+                </conditional>
+            </conditional>
+            <expand macro="test_file_load_single"/>
+            <assert_stdout>
+                <has_text text="object with 4 samples" />
+                <has_text text="Time range: 2506.1-4477.9 seconds (41.8-74.6 minutes)" />
+                <has_text text="Mass range: 200.1-600 m/z" />
+                <has_text text="Peaks: 9251 (about 2313 per sample)" />
+                <has_text text="Peak Groups: 611" />
+                <has_text text="Sample classes: ." />
+            </assert_stdout>
+        </test>
+        -->
+        <!-- DISABLE FOR TRAVIS Zip from xcmsSet
+        <test>
+            <param name="image" value="faahKO.xset.RData"/>
+            <conditional name="methods">
+                <param name="method" value="PeakDensity"/>
+                <param name="bw" value="5"/>
+                <param name="minFraction" value="0.3"/>
+                <param name="binSize" value="0.01"/>
+                <conditional name="density_options">
+                    <param name="option" value="show"/>
+                    <param name="maxFeatures" value="50"/>
+                </conditional>
+            </conditional>
             <conditional name="peaklist">
                 <param name="convertRTMinute" value="false" />
                 <param name="peaklistBool" value="true" />
                 <param name="numDigitsMZ" value="4" />
                 <param name="numDigitsRT" value="1" />
             </conditional>
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 4 samples" />
-                    <has_text text="Time range: 2506.1-4477.9 seconds (41.8-74.6 minutes)" />
-                    <has_text text="Mass range: 200.1-600 m/z" />
-                    <has_text text="Peaks: 9251 (about 2313 per sample)" />
-                    <has_text text="Peak Groups: 8275" />
-                    <has_text text="Sample classes: KO, WT" />
-                </assert_contents>
-            </output>
+            <expand macro="test_file_load_zip"/>
+            <assert_stdout>
+                <has_text text="object with 4 samples" />
+                <has_text text="Time range: 2506.1-4477.9 seconds (41.8-74.6 minutes)" />
+                <has_text text="Mass range: 200.1-600 m/z" />
+                <has_text text="Peaks: 9251 (about 2313 per sample)" />
+                <has_text text="Peak Groups: 8372" />
+                <has_text text="Sample classes: KO, WT" />
+            </assert_stdout>
             <output name="variableMetadata" file="faahKO.xset.group.variableMetadata.tsv" />
             <output name="dataMatrix" file="faahKO.xset.group.dataMatrix.tsv" />
         </test>
-        <test>
-            <param name="image" value="faahKO-single.xset.merged.RData"/>
-            <param name="methods|method" value="density"/>
-            <param name="methods|bw" value="5"/>
-            <param name="methods|minfrac" value="0.3"/>
-            <param name="methods|mzwid" value="0.01"/>
-            <param name="methods|density_options|option" value="show"/>
-            <param name="methods|density_options|max" value="50"/>
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 4 samples" />
-                    <has_text text="Time range: 2506.1-4477.9 seconds (41.8-74.6 minutes)" />
-                    <has_text text="Mass range: 200.1-600 m/z" />
-                    <has_text text="Peaks: 9251 (about 2313 per sample)" />
-                    <has_text text="Peak Groups: 664" />
-                    <has_text text="Sample classes: ." />
-                </assert_contents>
-            </output>
-        </test>
-        <test>
-            <param name="image" value="MM-single.xset.merged.RData"/>
-            <param name="methods|method" value="density"/>
-            <param name="methods|bw" value="5"/>
-            <param name="methods|minfrac" value="0.3"/>
-            <param name="methods|mzwid" value="0.01"/>
-            <param name="methods|density_options|option" value="show"/>
-            <param name="methods|density_options|max" value="50"/>
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 2 samples" />
-                    <has_text text="Time range: 19.7-307.3 seconds (0.3-5.1 minutes)" />
-                    <has_text text="Mass range: 117.0357-936.7059 m/z" />
-                    <has_text text="Peaks: 236 (about 118 per sample)" />
-                    <has_text text="Peak Groups: 236" />
-                    <has_text text="Sample classes: ." />
-                </assert_contents>
-            </output>
-        </test>
-        <!--<test>
-            <param name="image" value="xset.group.retcor.RData"/>
-            <param name="methods|method" value="density"/>
-            <param name="methods|bw" value="5"/>
-            <param name="methods|minfrac" value="0.3"/>
-            <param name="methods|mzwid" value="0.01"/>
-            <param name="methods|density_options|option" value="show"/>
-            <param name="methods|density_options|max" value="50"/>
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 4 samples" />
-                    <has_text text="Time range: 0.2-1140.1 seconds (0-19 minutes)" />
-                    <has_text text="Mass range: 50.0021-999.9863 m/z" />
-                    <has_text text="Peaks: 59359 (about 14840 per sample)" />
-                    <has_text text="Peak Groups: 48958" />
-                    <has_text text="Sample classes: bio, blank" />
-                </assert_contents>
-            </output>
-        </test>-->
+        -->
+
+        <!-- DISABLE FOR TRAVIS Zip from retcor
         <test>
             <param name="image" value="faahKO.xset.group.retcor.RData"/>
-            <param name="methods|method" value="density"/>
-            <param name="methods|bw" value="5"/>
-            <param name="methods|minfrac" value="0.3"/>
-            <param name="methods|mzwid" value="0.01"/>
-            <param name="methods|density_options|option" value="show"/>
-            <param name="methods|density_options|max" value="50"/>
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 4 samples" />
-                    <has_text text="Time range: 2507.7-4481.7 seconds (41.8-74.7 minutes)" />
-                    <has_text text="Mass range: 200.1-600 m/z" />
-                    <has_text text="Peaks: 9251 (about 2313 per sample)" />
-                    <has_text text="Peak Groups: 8157" />
-                    <has_text text="Sample classes: KO, WT" />
-                </assert_contents>
-            </output>
+            <conditional name="methods">
+                <param name="method" value="PeakDensity"/>
+                <param name="bw" value="5"/>
+                <param name="minFraction" value="0.3"/>
+                <param name="binSize" value="0.01"/>
+                <conditional name="density_options">
+                    <param name="option" value="show"/>
+                    <param name="maxFeatures" value="50"/>
+                </conditional>
+            </conditional>
+            <expand macro="test_file_load_zip"/>
+            <assert_stdout>
+                <has_text text="object with 4 samples" />
+                <has_text text="Time range: 2509.2-4480.3 seconds (41.8-74.7 minutes)" />
+                <has_text text="Mass range: 200.1-600 m/z" />
+                <has_text text="Peaks: 9251 (about 2313 per sample)" />
+                <has_text text="Peak Groups: 8209" />
+                <has_text text="Sample classes: KO, WT" />
+            </assert_stdout>
+        </test>
+        -->
+        <!-- from retcor -->
+        <test>
+            <param name="image" value="faahKO-single.xset.merged.group.retcor.RData"/>
+            <conditional name="methods">
+                <param name="method" value="PeakDensity"/>
+                <param name="bw" value="5"/>
+                <param name="minFraction" value="0.3"/>
+                <param name="binSize" value="0.01"/>
+                <section name="PeakDensityAdv">
+                    <param name="maxFeatures" value="50"/>
+                </section>
+            </conditional>
+            <expand macro="test_file_load_single"/>
+            <assert_stdout>
+                <has_text text="bw: 5" />
+                <has_text text="minFraction: 0.3" />
+                <has_text text="binSize: 0.01"/>
+                <has_text text="maxFeatures: 50" />
+                <has_text text="object with 4 samples" />
+                <has_text text="Time range: 2509.2-4480.3 seconds (41.8-74.7 minutes)" />
+                <has_text text="Mass range: 200.1-600 m/z" />
+                <has_text text="Peaks: 9251 (about 2313 per sample)" />
+                <has_text text="Peak Groups: 8209" />
+                <has_text text="Sample classes: KO, WT" />
+            </assert_stdout>
+        </test>
+        <!-- DISABLE FOR TRAVIS
+        Test to test the different methods parameters
+        <test expect_failure="True">
+            <param name="image" value="faahKO-single.xset.merged.group.retcor.RData"/>
+            <conditional name="methods">
+                <param name="method" value="MzClust"/>
+                <param name="ppm" value="21"/>
+                <param name="absMz" value="0.1"/>
+            </conditional>
+            <expand macro="test_file_load_single"/>
+            <assert_stdout>
+                <has_text text="ppm: 21" />
+                <has_text text="absMz: 0.1" />
+            </assert_stdout>
         </test>
         <test>
             <param name="image" value="faahKO-single.xset.merged.group.retcor.RData"/>
-            <param name="methods|method" value="density"/>
-            <param name="methods|bw" value="5"/>
-            <param name="methods|minfrac" value="0.3"/>
-            <param name="methods|mzwid" value="0.01"/>
-            <param name="methods|density_options|option" value="show"/>
-            <param name="methods|density_options|max" value="50"/>
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 4 samples" />
-                    <has_text text="Time range: 2507.7-4481.7 seconds (41.8-74.7 minutes)" />
-                    <has_text text="Mass range: 200.1-600 m/z" />
-                    <has_text text="Peaks: 9251 (about 2313 per sample)" />
-                    <has_text text="Peak Groups: 8157" />
-                    <has_text text="Sample classes: KO, WT" />
-                </assert_contents>
-            </output>
+            <conditional name="methods">
+                <param name="method" value="NearestPeaks"/>
+                <param name="mzVsRtBalance" value="11"/>
+                <param name="absMz" value="0.1"/>
+            </conditional>
+            <expand macro="test_file_load_single"/>
+            <assert_stdout>
+                <has_text text="mzVsRtBalance: 11" />
+                <has_text text="absMz: 0.1" />
+            </assert_stdout>
         </test>
+        -->
     </tests>
 
     <help><![CDATA[
 
 @HELP_AUTHORS@
 
-==========
-Xcms.Group
-==========
+====================
+xcms groupChromPeaks
+====================
 
 -----------
 Description
@@ -288,8 +269,6 @@
 
 After peak identification with xcmsSet, this tool groups the peaks which represent the same analyte across samples using overlapping m/z bins and calculation of smoothed peak distributions in chromatographic time. Allows rejection of features, which are only partially detected within the replicates of a sample class.
 
-
-
 -----------------
 Workflow position
 -----------------
@@ -344,18 +323,28 @@
 Method to use for grouping
 --------------------------
 
-**mzClust**
+**MzClust**
+
+    | This method performs high resolution correspondence for single spectra samples.
+    | See the MzClust_manual_
 
-    | Runs high resolution alignment on single spectra samples stored in the RData file generated by the **xcmsSet tool**.
+**PeakDensity**
 
-**density**
+    | This method performs performs correspondence (chromatographic peak grouping) based on the density (distribution) of identified peaks along the retention time axis within slices of overlapping mz ranges.  All peaks (from the same or from different samples) being close on the retention time axis are grouped into a feature (peak group).
+    | See the PeakDensity_manual_
 
-    | Groups peaks together across samples using overlapping m/z bins and calculation of smoothed peak distributions in chromatographic time.
+**NearestPeaks**
+
+    | This method is inspired by the grouping algorithm of mzMine [Katajamaa 2006] and performs correspondence based on proximity of peaks in the space spanned by retention time and mz values.  The method creates first a master peak list consisting of all chromatographic peaks from the sample in which most peaks were identified, and starting from that, calculates distances to peaks from the sample with the next most number of peaks. If peaks are closer than the defined threshold they are grouped together.
+    | See the NearestPeaks_manual_
 
-**nearest**
+.. _MzClust_manual: https://rdrr.io/bioc/xcms/man/groupChromPeaks-mzClust.html#heading-2
+.. _PeakDensity_manual: https://rdrr.io/bioc/xcms/man/groupChromPeaks-density.html#heading-2
+.. _NearestPeaks_manual: https://rdrr.io/bioc/xcms/man/groupChromPeaks-nearest.html#heading-2
 
-    | Groups peaks together across samples by creating a master peak list and assigning corresponding peaks from all samples. It is inspired by the alignment algorithm of mzMine.
+@HELP_XCMS_MANUAL@
 
+@HELP_PEAKLIST@
 
 ------------
 Output files
@@ -392,10 +381,10 @@
 
     | Method -> **density**
     | bw     -> **5**
-    | minfrac -> **0.3**
-    | mzwid    -> **0.01**
+    | minFraction -> **0.3**
+    | binSize    -> **0.01**
     | Advanced options: **show**
-    | max -> **50**
+    | maxFeatures -> **50**
 
 
 Output files
@@ -413,6 +402,9 @@
 
 Changelog/News
 --------------
+**Version 3.0.0.0 - 14/02/2018**
+
+- UPGRADE: upgrade the xcms version from 1.46.0 to 3.0.0. So refactoring of a lot of underlining codes and methods
 
 **Version 2.1.1 - 29/11/2017**