0
|
1 <tool id="cshl_fastx_clipper" name="Clip" version="1.0.1" >
|
|
2 <description>adapter sequences</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="0.0.13">fastx_toolkit</requirement>
|
|
5 </requirements>
|
|
6 <command>
|
|
7 zcat -f $input | fastx_clipper -l $minlength -a $clip_source.clip_sequence -d $keepdelta -o $output -v $KEEP_N $DISCARD_OPTIONS
|
|
8 #if $input.ext == "fastqsanger":
|
|
9 -Q 33
|
|
10 #end if
|
|
11 </command>
|
|
12
|
|
13 <inputs>
|
|
14 <param format="fasta,fastqsanger,fastqsolexa,fastqillumina" name="input" type="data" label="Library to clip" />
|
|
15
|
|
16 <param name="minlength" size="4" type="integer" value="15">
|
|
17 <label>Minimum sequence length (after clipping, sequences shorter than this length will be discarded)</label>
|
|
18 </param>
|
|
19
|
|
20 <conditional name="clip_source">
|
|
21 <param name="clip_source_list" type="select" label="Source">
|
|
22 <option value="prebuilt" selected="true">Standard (select from the list below)</option>
|
|
23 <option value="user">Enter custom sequence</option>
|
|
24 </param>
|
|
25
|
|
26 <when value="user">
|
|
27 <param name="clip_sequence" size="30" label="Enter custom clipping sequence" type="text" value="AATTGGCC" />
|
|
28 </when>
|
|
29
|
|
30 <when value="prebuilt">
|
|
31 <param name="clip_sequence" type="select" label="Choose Adapter">
|
|
32 <options from_file="fastx_clipper_sequences.txt">
|
|
33 <column name="name" index="1"/>
|
|
34 <column name="value" index="0"/>
|
|
35 </options>
|
|
36 </param>
|
|
37 </when>
|
|
38 </conditional>
|
|
39
|
|
40 <param name="keepdelta" size="2" type="integer" value="0">
|
|
41 <label>enter non-zero value to keep the adapter sequence and x bases that follow it</label>
|
|
42 <help>use this for hairpin barcoding. keep at 0 unless you know what you're doing.</help>
|
|
43 </param>
|
|
44
|
|
45 <param name="KEEP_N" type="select" label="Discard sequences with unknown (N) bases">
|
|
46 <option value="">Yes</option>
|
|
47 <option value="-n">No</option>
|
|
48 </param>
|
|
49
|
|
50 <param name="DISCARD_OPTIONS" type="select" label="Output options">
|
|
51 <option value="-c">Output only clipped sequences (i.e. sequences which contained the adapter)</option>
|
|
52 <option value="-C">Output only non-clipped sequences (i.e. sequences which did not contained the adapter)</option>
|
|
53 <option value="">Output both clipped and non-clipped sequences</option>
|
|
54 </param>
|
|
55
|
|
56 </inputs>
|
|
57 <!--
|
|
58 #functional test with param value starting with - fails.
|
|
59 -->
|
|
60 <tests>
|
|
61 <test>
|
|
62 <param name="input" value="fastx_clipper1.fastq" ftype="fastqsolexa"/>
|
|
63 <param name="maxmismatches" value="2" />
|
|
64 <param name="minlength" value="15" />
|
|
65 <param name="clip_source_list" value="user" />
|
|
66 <param name="clip_sequence" value="CAATTGGTTAATCCCCCTATATA" />
|
|
67 <param name="keepdelta" value="0" />
|
|
68 <param name="KEEP_N" value="+-n" />
|
|
69 <param name="DISCARD_OPTIONS" value="+-c" />
|
|
70 <output name="output" file="fastx_clipper1a.out" />
|
|
71 </test>
|
|
72 </tests>
|
|
73 <outputs>
|
|
74 <data format="input" name="output" metadata_source="input" />
|
|
75 </outputs>
|
|
76
|
|
77 <help>
|
|
78 **What it does**
|
|
79
|
|
80 This tool clips adapters from the 3'-end of the sequences in a FASTA/FASTQ file.
|
|
81
|
|
82 --------
|
|
83
|
|
84
|
|
85 **Clipping Illustration:**
|
|
86
|
|
87 .. image:: ${static_path}/fastx_icons/fastx_clipper_illustration.png
|
|
88
|
|
89
|
|
90
|
|
91
|
|
92
|
|
93
|
|
94
|
|
95
|
|
96 **Clipping Example:**
|
|
97
|
|
98 .. image:: ${static_path}/fastx_icons/fastx_clipper_example.png
|
|
99
|
|
100
|
|
101
|
|
102 **In the above example:**
|
|
103
|
|
104 * Sequence no. 1 was discarded since it wasn't clipped (i.e. didn't contain the adapter sequence). (**Output** parameter).
|
|
105 * Sequence no. 5 was discarded --- it's length (after clipping) was shorter than 15 nt (**Minimum Sequence Length** parameter).
|
|
106
|
|
107
|
|
108
|
|
109
|
|
110 ------
|
|
111
|
|
112 This tool is based on `FASTX-toolkit`__ by Assaf Gordon.
|
|
113
|
|
114 .. __: http://hannonlab.cshl.edu/fastx_toolkit/
|
|
115
|
|
116 </help>
|
|
117 </tool>
|