view tools/fasta_tools/fasta_filter_by_length.xml @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
line wrap: on
line source

<tool id="fasta_filter_by_length" name="Filter sequences by length" version="1.1">
	<description></description>
	<command interpreter="python">fasta_filter_by_length.py $input $min_length $max_length $output </command>
	<inputs>
		<param name="input" type="data" format="fasta" label="Fasta file"/>
		<param name="min_length" type="integer" size="15" value="0" label="Minimal length" />
		<param name="max_length" type="integer" size="15" value="0" label="Maximum length" help="Setting to '0' will return all sequences longer than the 'Minimal length'"/> 
	</inputs>
	<outputs>
		<data name="output" format="fasta"/>
	</outputs>
	<tests>
		<test>
			<param name="input" value="454.fasta" />
			<param name="min_length" value="10" />
			<param name="max_length" value="0" />
			<output name="output" file="fasta_tool_filter_length_1.out" />
		</test>
	</tests>
	<help>

.. class:: infomark

**TIP**. To return sequences longer than a certain length, set *Minimal length* to desired value and leave *Maximum length* set to '0'.

-----

**What it does**
	
Outputs sequences between *Minimal length* and *Maximum length*.
 
-----

**Example**

Suppose you have the following FASTA formatted sequences::

	&gt;seq1
	TCATTTAATGAC
	&gt;seq2
	ATGGC
	&gt;seq3
	TCACATGATGCCG
	&gt;seq4
	ATGGAAGC

Setting the **Minimal length** to **10**, and the **Maximum length** to **0** will return all sequences longer than 10 bp::

 	&gt;seq1
	TCATTTAATGAC
	&gt;seq3
	TCACATGATGCCG


	</help>
</tool>