view uniq.xml @ 1:d4fb020c19ca draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/file_manipulation commit f3cda75b01f512edd8723f157db104fca819ce0c
author bgruening
date Tue, 13 Dec 2016 03:02:52 -0500
parents 2064ae2602b1
children
line wrap: on
line source

<tool id="bg_uniq" name="unique" version="0.4">
    <description>occurrences of each record</description>
    <requirements>
        <requirement type="package" version="2.7.12">python</requirement>
    </requirements>
    <command>
<![CDATA[
    python '$__tool_directory__/uniq.py'
        $ignore_case
        $is_numeric
        #if $adv_opts.adv_opts_selector=="advanced":
            $adv_opts.column_start
            $adv_opts.column_end
        #end if
        '$outfile'
        '$input'
]]>
  </command>
  <inputs>
    <param name="input" type="data" format="tabular,text" label="from query" />
    <param name="ignore_case" type="boolean" label="Ignore differences in case when comparing" truevalue="-f" falsevalue="false" checked="false" />
    <param name="is_numeric" type="boolean" label="Column only contains numeric values" truevalue="-n" falsevalue="false" checked="false" />
    <conditional name="adv_opts">
        <param name="adv_opts_selector" type="select" label="Advanced Options">
          <option value="basic" selected="True">Hide Advanced Options</option>
          <option value="advanced">Show Advanced Options</option>
        </param>
        <when value="basic" />
        <when value="advanced">
            <param name="column_start" label="Column start" type="data_column" data_ref="input" help="Unique on specific column range"/>
            <param name="column_end" label="Column end" type="data_column" data_ref="input" help="Unique on specific column range"/>
        </when>
    </conditional>
  </inputs>
  <outputs>
    <data format="input" name="outfile" />
  </outputs>
  <tests>
    <test>
      <param name="input" value="1.bed"/>
      <param name="is_numeric" value="True"/>
      <param name="ignore_case" value="True"/>
      <param name="adv_opts_selector" value="advanced"/>
      <param name="column_start" value="2"/>
      <param name="column_end" value="3"/>
      <output name="outfile" file="uniq_results1.bed"/>
    </test>
    <test>
      <param name="input" value="1.bed"/>
      <param name="is_numeric" value="False"/>
      <param name="ignore_case" value="True"/>
      <param name="adv_opts_selector" value="advanced"/>
      <param name="column_start" value="1"/>
      <param name="column_end" value="1"/>
      <output name="outfile" file="uniq_results2.bed"/>
    </test>
  </tests>
  <help>
<![CDATA[


**What it does**

This tool returns all unique lines using the 'sort -u' command.
    
**Input**

The input file needs to be tab separated. Please convert your file if necessary.

**Output**

This tool returns all unique lines:

Example:

- Input file::

       chr1   10  100  gene1
       chr1  105  200  gene2
       chr1   10  100  gene1
       chr2   10  100  gene4
       chr2 1000 1900  gene5
       chr3   15 1656  gene6
       chr2   10  100  gene4

- Unique lines will result in::

       chr1   10  100  gene1
       chr1  105  200  gene2
       chr2   10  100  gene4
       chr2 1000 1900  gene5
       chr3   15 1656  gene6


]]>
    </help>
    <citations>
        <citation type="bibtex">
            @ARTICLE{bgruening_galaxytools,
                Author = {Björn Grüning, Cameron Smith, Torsten Houwaart, Nicola Soranzo, Eric Rasche},
                keywords = {bioinformatics, ngs, galaxy, cheminformatics, rna},
                title = {{Galaxy Tools - A collection of bioinformatics and cheminformatics tools for the Galaxy environment}},
                url = {https://github.com/bgruening/galaxytools}
            }
        </citation>
    </citations>
</tool>