mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
86 lines
2.3 KiB
XML
86 lines
2.3 KiB
XML
<tool id="Cut1" name="Cut">
|
|
<description>columns from a table</description>
|
|
<command interpreter="perl">cutWrapper.pl $input "$columnList" $delimiter $out_file1</command>
|
|
<inputs>
|
|
<param name="columnList" size="10" type="text" value="c1,c2" label="Cut columns"/>
|
|
<param name="delimiter" type="select" label="Delimited by">
|
|
<option value="T">Tab</option>
|
|
<option value="Sp">Whitespace</option>
|
|
<option value="Dt">Dot</option>
|
|
<option value="C">Comma</option>
|
|
<option value="D">Dash</option>
|
|
<option value="U">Underscore</option>
|
|
<option value="P">Pipe</option>
|
|
</param>
|
|
<param format="txt" name="input" type="data" label="From"/>
|
|
</inputs>
|
|
<outputs>
|
|
<data format="tabular" name="out_file1" />
|
|
</outputs>
|
|
<tests>
|
|
<test>
|
|
<param name="columnList" value="c1,c4,c2,c3"/>
|
|
<param name="delimiter" value="T"/>
|
|
<param name="input" value="1.bed"/>
|
|
<output name="out_file1" file="eq-cut.dat"/>
|
|
</test>
|
|
</tests>
|
|
<help>
|
|
|
|
.. class:: warningmark
|
|
|
|
**WARNING: This tool breaks column assignments.** To re-establish column assignments run the tools and click on the pencil icon in the latest history item.
|
|
|
|
.. class:: infomark
|
|
|
|
The output of this tool is always in tabular format (e.g., if your original delimiters are commas, they will be replaced with tabs). For example:
|
|
|
|
Cutting columns 1 and 3 from::
|
|
|
|
apple,is,good
|
|
windows,is,bad
|
|
|
|
will give::
|
|
|
|
apple good
|
|
windows bad
|
|
|
|
-----
|
|
|
|
**What it does**
|
|
|
|
This tool selects (cuts out) specified columns from the dataset.
|
|
|
|
- Columns are specified as **c1**, **c2**, and so on. Column count begins with **1**
|
|
- Columns can be specified in any order (e.g., **c2,c1,c6**)
|
|
- If you specify more columns than actually present - empty spaces will be filled with dots
|
|
|
|
-----
|
|
|
|
**Example**
|
|
|
|
Input dataset (six columns: c1, c2, c3, c4, c5, and c6)::
|
|
|
|
chr1 10 1000 gene1 0 +
|
|
chr2 100 1500 gene2 0 +
|
|
|
|
**cut** on columns "**c1,c4,c6**" will return::
|
|
|
|
chr1 gene1 +
|
|
chr2 gene2 +
|
|
|
|
**cut** on columns "**c6,c5,c4,c1**" will return::
|
|
|
|
+ 0 gene1 chr1
|
|
+ 0 gene2 chr2
|
|
|
|
|
|
**cut** on columns "**c8,c7,c4**" will return::
|
|
|
|
. . gene1
|
|
. . gene2
|
|
|
|
|
|
</help>
|
|
</tool>
|