<tool id="common unique" name="Com&amp;Uni" version="1.1.0">
  <description>easy way to compare results</description>
  <command>/data/galaxy/tools/CARPET/comuni $window ${match_choice.type} ${match_choice.conc} $input1 $input2 $output</command>
  <inputs>
    <param format="tabular" name="input1" type="data" label="Principal table"/>
    <param format="tabular" name="input2" type="data" label="Secondary table"/>
    <param name="window" type="integer" size="7" value="0" label="flank"/>
    <conditional name="match_choice">
   		 <param name="type" type="select" label="Analysis type">
     		 <option value="common">common</option>
     		 <option value="unique">unique</option>
     		 <option value="union">union</option>
    	 </param>
    	 <when value="common">	 
     		<param name="conc" type="select" label="coordinate common">
     			<option value="yes">merge</option>
     		 	<option value="no">Principal table</option>
    		 </param>
    	 </when>	
    	  <when value="unique">	 
     		<param name="conc" type="select" label="coordinate common">
     		 	<option value="no">Principal table</option>
    		 </param>
    	 </when>	
    	  <when value="union">	 
     		<param name="conc" type="select" label="coordinate common">
     			<option value="yes">merge</option>
            </param>
    	 </when>	
   </conditional>
  </inputs>
  <outputs>
     <data format="bed" name="output" file="common.dat"/>
  </outputs>

  <tests>
    <test>
      <param name="input" value="1.gff"/>
      <output name="output" file="wig-gff2bed.dat"/>
    </test>
  </tests>
 <help>
.. class:: infomark

**What it does**

This tool evaluates the co-occurence of peaks between two GFF files. Common and/or unique peaks can be sorted out as exemplified below. It is possible to add a flanking region to the coordinates of the original peaks.

--------

**Example:**

- **Common merge**

.. image:: static/images/CARPET/common_merg.png

--------

- **Common Principal table**

.. image:: static/images/CARPET/common_princ.png

--------

- **Unique**

.. image:: static/images/CARPET/unique.png

--------

- **Union**

.. image:: static/images/CARPET/union.png

  </help>
</tool>
