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

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

<tool id="fasta_compute_length" name="Compute sequence length">
	<command interpreter="python"> $input $output $keep_first</command>
		<param name="input" type="data" format="fasta" label="Compute length for these sequences"/>
		<param name="keep_first" type="integer" size="5" value="0" label="How many title characters to keep?" help="'0' = keep the whole thing"/>
		<data name="output" format="tabular"/>
			<param name="input" value="454.fasta" />
			<param name="keep_first" value="0"/>
			<output name="output" file="fasta_tool_compute_length_1.out" />
			<param name="input" value="extract_genomic_dna_out1.fasta" />
			<param name="keep_first" value="0"/>
			<output name="output" file="fasta_tool_compute_length_2.out" />
			<param name="input" value="454.fasta" />
			<param name="keep_first" value="14"/>
			<output name="output" file="fasta_tool_compute_length_3.out" />

**What it does**

This tool counts the length of each fasta sequence in the file. The output file has two columns per line (separated by tab): fasta titles and lengths of the sequences. The option *How many characters to keep?* allows to select a specified number of letters from the beginning of each FASTA entry. 



Suppose you have the following FASTA formatted sequences from a Roche (454) FLX sequencing run::

    &gt;EYKX4VC02EQLO5 length=108 xy=1826_0455 region=2 run=R_2007_11_07_16_15_57_
    &gt;EYKX4VC02D4GS2 length=60 xy=1573_3972 region=2 run=R_2007_11_07_16_15_57_

Running this tool while setting **How many characters to keep?** to **14** will produce this::
	EYKX4VC02EQLO5  108
	EYKX4VC02D4GS2	 60