PageRenderTime 21ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/fastx_toolkit/fastx_trimmer.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 81 lines | 59 code | 19 blank | 3 comment | 0 complexity | cde5be9e5f1db725d1ee243223867788 MD5 | raw file
 1<tool id="cshl_fastx_trimmer" name="Trim sequences">
 2	<description></description>
 3	<requirements><requirement type="package">fastx_toolkit</requirement></requirements>
 4	<command>zcat -f '$input' | fastx_trimmer -v -f $first -l $last -o $output
 5#if $input.ext == "fastqsanger":
 6-Q 33
 7#end if
 8	</command>
 9
10	<inputs>
11		<param format="fasta,fastqsolexa,fastqsanger" name="input" type="data" label="Library to clip" />
12
13		<param name="first" size="4" type="integer" value="1">
14			<label>First base to keep</label>
15		</param>
16
17		<param name="last" size="4" type="integer" value="21">
18			<label>Last base to keep</label>
19		</param>
20	</inputs>
21
22	<tests>
23		<test>
24			<!-- Trim a FASTA file - remove first four bases (e.g. a barcode) -->
25			<param name="input" value="fastx_trimmer1.fasta" />
26			<param name="first" value="5"/>
27			<param name="last" value="36"/>
28			<output name="output" file="fastx_trimmer1.out" />
29		</test>
30		<test>
31			<!-- Trim a FASTQ file - remove last 9 bases (e.g. keep only miRNA length sequences) -->
32			<param name="input" value="fastx_trimmer2.fastq" ftype="fastqsolexa"/>
33			<param name="first" value="1"/>
34			<param name="last" value="27"/>
35			<output name="output" file="fastx_trimmer2.out" />
36		</test>
37	</tests>
38
39	<outputs>
40		<data format="input" name="output" metadata_source="input" />
41	</outputs>
42	<help>
43**What it does**
44
45This tool trims (cut bases from) sequences in a FASTA/Q file.
46  
47--------
48
49**Example**
50
51Input Fasta file (with 36 bases in each sequences)::
52
53    >1-1
54    TATGGTCAGAAACCATATGCAGAGCCTGTAGGCACC
55    >2-1
56    CAGCGAGGCTTTAATGCCATTTGGCTGTAGGCACCA
57    
58
59Trimming with First=1 and Last=21, we get a FASTA file with 21 bases in each sequences (starting from the first base)::
60
61    >1-1
62    TATGGTCAGAAACCATATGCA
63    >2-1
64    CAGCGAGGCTTTAATGCCATT
65
66Trimming with First=6 and Last=10, will generate a FASTA file with 5 bases (bases 6,7,8,9,10) in each sequences::
67
68    >1-1
69    TCAGA
70    >2-1
71    AGGCT
72    
73    ------
74
75This tool is based on `FASTX-toolkit`__ by Assaf Gordon.
76
77 .. __: http://hannonlab.cshl.edu/fastx_toolkit/
78    
79</help>
80</tool>
81<!-- FASTX-Trimmer is part of the FASTX-toolkit, by A.Gordon (gordon@cshl.edu) -->