view tools/unix_tools/remove_ending.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
line wrap: on
line source

<tool id="Remove ending" name="Remove ending">
  <description>of a file</description>
  <command interpreter="sh">remove_ending.sh $num_lines $input $out_file1</command>
  <inputs>
    <param name="num_lines" size="5" type="integer" value="1" label="Remove last" help="lines"/>
    <param format="txt" name="input" type="data" label="from"/>
  </inputs>
  <tests>
	  <test>
		  <param name="input" value="remove_ending_input1.txt" />
		  <output name="out_file1" file="remove_ending_output1.txt" />
		  <param name="num_lines" value="2" />
	  </test>
  </tests>
  <outputs>
    <data format="input" name="out_file1" metadata_source="input"/>
  </outputs>
  <help>

**What it does**

This tool removes specified number of lines from the ending of a dataset

-----

**Example**

Input File::

    chr7  56632  56652   D17003_CTCF_R6  310  +
    chr7  56736  56756   D17003_CTCF_R7  354  +
    chr7  56761  56781   D17003_CTCF_R4  220  +
    chr7  56772  56792   D17003_CTCF_R7  372  +
    chr7  56775  56795   D17003_CTCF_R4  207  +

After removing the last 2 lines the dataset will look like this::

    chr7  56632  56652   D17003_CTCF_R6  310  +
    chr7  56736  56756   D17003_CTCF_R7  354  +
    chr7  56761  56781   D17003_CTCF_R4  220  +

</help>
</tool>