-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcutadapt_primer_trim.xml
executable file
·117 lines (114 loc) · 5.32 KB
/
cutadapt_primer_trim.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<tool id="cutadapt_primer_trim" name="Trim primers" version="0.1.0">
<requirements>
<requirement type="package" version="3.7.0">python</requirement>
<requirement type="package" version="2.8">cutadapt</requirement>
<requirement type="package" version="6.0">unzip</requirement>
<requirement type="package">biopython</requirement>
<!-- As of 2022-10-18 the conda env does not resolve with biopython version="1.79"
even though this version does get installed when nothing is specified -->
</requirements>
<command><![CDATA[
bash '$__tool_directory__/cutadapt.sh'
$input
$type
#if $setting_mode.mode == "forward_mode"
$setting_mode.mode
$setting_mode.forward_primer
$setting_mode.error_rate
$setting_mode.min_length
$setting_mode.output_untrimmed
$setting_mode.overlap
#end if
#if $setting_mode.mode == "reverse_mode"
$setting_mode.mode
$setting_mode.reverse_primer
$setting_mode.error_rate
$setting_mode.min_length
$setting_mode.output_untrimmed
$setting_mode.overlap
#end if
#if $setting_mode.mode == "both_mode" or $setting_mode.mode == "both_mode_anchored" or $setting_mode.mode == "both_three_optional_mode"
$setting_mode.mode
$setting_mode.forward_primer
$setting_mode.reverse_primer
$setting_mode.error_rate
$setting_mode.min_length
$setting_mode.output_untrimmed
$setting_mode.overlap
#end if
$output_zip
$output_log
$output_zip_untrimmed
]]></command>
<macros>
<macro name="forward">
<param name="overlap" type="integer" label="Minimum number of bases that need to match" value="5" min="1" max="100"/>
<param name="error_rate" type="float" label="maximum allowed error rate for primer trimming" value="0.2" min="0.0" max="1"/>
<param name="min_length" type="integer" label="Minimum read length" value="10" min="0" max="999"/>
<param name="forward_primer" type="text" size="30" label="Forward primer sequence" />
<param name="output_untrimmed" type="boolean" label="Output untrimmed sequences" checked="no" truevalue="yes" falsevalue="no"/>
</macro>
<macro name="reverse">
<param name="overlap" type="integer" label="Minimum number of bases that need to match" value="5" min="1" max="100"/>
<param name="error_rate" type="float" label="maximum allowed error rate for primer trimming" value="0.2" min="0.0" max="1"/>
<param name="min_length" type="integer" label="Minimum read length" value="10" min="0" max="999"/>
<param name="reverse_primer" type="text" size="30" label="reverse primer sequence" />
<param name="output_untrimmed" type="boolean" label="Output untrimmed sequences" checked="no" truevalue="yes" falsevalue="no"/>
</macro>
<macro name="both">
<param name="overlap" type="integer" label="Minimum number of bases that need to match" value="5" min="1" max="100"/>
<param name="error_rate" type="float" label="maximum allowed error rate for primer trimming" value="0.2" min="0.0" max="1"/>
<param name="min_length" type="integer" label="Minimum read length" value="10" min="0" max="999"/>
<param name="forward_primer" type="text" size="30" label="Forward primer sequence" />
<param name="reverse_primer" type="text" size="30" label="reverse primer sequence" />
<param name="output_untrimmed" type="boolean" label="Output untrimmed sequences" checked="no" truevalue="yes" falsevalue="no"/>
</macro>
<macro name="advanced">
<param name="command" type="text" size="300" label="Advanced command" />
</macro>
</macros>
<inputs>
<param format="zip" name="input" type="data" label="zip file containing fasta or fastq files"/>
<param name="type" type="select" multiple="false" label="Input type">
<option value="gz">gzip files</option>
<option value="FASTQ" selected="true">fastq files</option>
</param>
<conditional name="setting_mode">
<param name="mode" type="select" multiple="false" label="Settings mode">
<option value="forward_mode" selected="true">Trim forward primer only</option>
<option value="reverse_mode">Trim reverse primer only</option>
<option value="both_mode">Both need to be present</option>
<option value="both_mode_anchored">Both need to be present and are anchored</option>
<option value="both_three_optional_mode">Forward needs to be present, reverse is optional</option>
</param>
<when value="forward_mode">
<expand macro="forward"/>
</when>
<when value="reverse_mode">
<expand macro="reverse"/>
</when>
<when value="both_mode">
<expand macro="both"/>
</when>
<when value="both_mode_anchored">
<expand macro="both"/>
</when>
<when value="both_three_optional_mode">
<expand macro="both"/>
</when>
</conditional>
</inputs>
<outputs>
<data format="zip" name="output_zip" label="$input.display_name zip" />
<data format="txt" name="output_log" label="$input.display_name log" />
<data format="zip" name="output_zip_untrimmed" label="$input.display_name untrimmed zip">
<filter>setting_mode['output_untrimmed']</filter>
</data>
</outputs>
<help>
**Trim primers with Cutadapt**
</help>
<citations>
<citation type="doi">10.14806/ej.17.1.200</citation>
</citations>
</tool>