Mercurial > repos > bgruening > text_processing
diff nl.xml @ 26:f22a309187a3 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
| author | bgruening |
|---|---|
| date | Fri, 16 Aug 2024 10:41:17 +0000 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nl.xml Fri Aug 16 10:41:17 2024 +0000 @@ -0,0 +1,63 @@ +<tool id="nl" name="Number lines" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> + <description></description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="creator"/> + <expand macro="requirements" /> + <version_command>nl --version | head -n 1</version_command> + <command><![CDATA[ + nl + --line-increment=$line_increment + --starting-line-number=$starting_line_number + --number-format=$number_format + --number-width=$number_width + '$input' + > '$output' + ]]></command> + <inputs> + <param name="input" format="txt" type="data" label="File to number" /> + <param argument="--line-increment" type="integer" value="1" label="Line number increment at each line"/> + <param argument="--starting-line-number" type="integer" value="1" label="First line number"/> + <param argument="--number-format" type="select" label="Line number format"> + <option value="ln">left justified, no leading zeros</option> + <option value="rn" selected="true">right justified, no leading zeros</option> + <option value="rz">right justified, leading zeros</option> + </param> + <param argument="--number-width" type="integer" min="1" value="6" label="Number of characters for line numbers"/> + </inputs> + <outputs> + <data format_source="input" name="output"/> + </outputs> + <tests> + <test> + <param name="input" value="cut1.txt" ftype="tabular"/> + <output name="output" file="nl-out.txt" ftype="tabular"/> + </test> + <test> + <param name="input" value="cut1.txt" ftype="tabular"/> + <param name="number_format" value="ln"/> + <param name="number_width" value="1"/> + <output name="output" file="nl-out-number-format.txt" ftype="tabular"> + <assert_contents> + <!-- no filling spaces --> + <has_text text=" " negate="true"/> + </assert_contents> + </output> + </test> + <test> + <param name="input" value="cut1.txt" ftype="tabular"/> + <param name="line_increment" value="2"/> + <param name="starting_line_number" value="10"/> + <output name="output" file="nl-start-incr.txt" ftype="tabular"/> + </test> + </tests> + <help> +<![CDATA[ +**What it does** + +Add line numbers to the data set. +]]> + </help> + <expand macro="citations" /> +</tool>
