1
- <tool id =" porechop" name =" Porechop" version =" @WRAPPER_VERSION@+galaxy0 " profile =" 20.01" >
1
+ <tool id =" porechop" name =" Porechop" version =" @WRAPPER_VERSION@+galaxy1 " profile =" 20.01" >
2
2
<description >adapter trimmer for Oxford Nanopore reads</description >
3
3
<macros >
4
4
<token name =" @WRAPPER_VERSION@" >0.2.4</token >
8
8
</requirements >
9
9
<version_command >porechop --version</version_command >
10
10
<command detect_errors =" exit_code" ><![CDATA[
11
+ #import re
12
+
13
+ #set file_path = re.sub('[^\s\w\-.]', '_', str($input_file.element_identifier))
14
+
15
+ ln -s '$input_file' '$file_path' &&
16
+
11
17
porechop
12
- -i '$input_file '
18
+ -i '$file_path '
13
19
--format '$format'
14
20
--barcode_threshold '$barcode_binning_settings.barcode_threshold'
15
21
--barcode_diff '$barcode_binning_settings.barcode_diff'
@@ -29,6 +35,9 @@ porechop
29
35
--extra_middle_trim_bad_side '$middle_adapter_settings.extra_middle_trim_bad_side'
30
36
--min_split_read_size '$middle_adapter_settings.min_split_read_size'
31
37
-o 'out.$format'
38
+ #if $log_file
39
+ > '$log_output'
40
+ #end if
32
41
33
42
]]> </command >
34
43
<inputs >
@@ -83,6 +92,7 @@ porechop
83
92
<param argument =" --min_split_read_size" type =" integer" min =" 0" value =" 1000" optional =" True" label =" Minimum length reads post-split"
84
93
help =" Post-split read pieces smaller than this many base pairs will not be outputted (default: 1000)" />
85
94
</section >
95
+ <param name =" log_file" type =" boolean" label =" Generate log file" help =" Generates a log file out of stdout, which can be used as MultiQC input" />
86
96
</inputs >
87
97
<outputs >
88
98
<data name =" outfile" format =" fasta" from_work_dir =" out.*" label =" ${tool.name} on ${on_string}: Trimmed" >
@@ -92,34 +102,46 @@ porechop
92
102
<when input =" format" value =" fastq.gz" format =" fastqsanger.gz" />
93
103
</change_format >
94
104
</data >
105
+ <data name =" log_output" format =" txt" label =" Porechop log file" >
106
+ <filter >log_file</filter >
107
+ </data >
95
108
</outputs >
96
109
<tests >
97
- <test >
110
+ <test expect_num_outputs = " 2 " >
98
111
<param name =" input_file" ftype =" fasta" value =" test_format.fasta" />
99
112
<param name =" format" value =" fasta" />
113
+ <param name =" log_file" value =" true" />
100
114
<output name =" outfile" ftype =" fasta" file =" out.fasta" />
115
+ <output name =" log_output" ftype =" txt" >
116
+ <assert_contents >
117
+ <has_line line =" PCR adapters 2 66.7 63.6" />
118
+ <has_line line =" Barcode 1 (reverse) 59.4 66.7" />
119
+ <has_line line =" 4 / 9 reads had adapters trimmed from their start (74 bp removed)" />
120
+ <has_line line =" 3 / 9 reads had adapters trimmed from their end (49 bp removed)" />
121
+ </assert_contents >
122
+ </output >
101
123
</test >
102
- <test >
124
+ <test expect_num_outputs = " 1 " >
103
125
<param name =" input_file" ftype =" fastqsanger.gz" value =" test_format.fastq.gz" />
104
126
<param name =" format" value =" fastq" />
105
127
<output name =" outfile" ftype =" fastqsanger" file =" out.fastq" />
106
128
</test >
107
- <test >
129
+ <test expect_num_outputs = " 1 " >
108
130
<param name =" input_file" ftype =" fastq.gz" value =" test_format.fastq.gz" />
109
131
<param name =" format" value =" fastq" />
110
132
<output name =" outfile" ftype =" fastqsanger" file =" out.fastq" />
111
133
</test >
112
- <test >
134
+ <test expect_num_outputs = " 1 " >
113
135
<param name =" input_file" ftype =" fasta" value =" test_format.fasta" />
114
136
<param name =" format" value =" fasta.gz" />
115
137
<output name =" outfile" ftype =" fasta.gz" file =" out.fasta.gz" compare =" sim_size" />
116
138
</test >
117
- <test >
139
+ <test expect_num_outputs = " 1 " >
118
140
<param name =" input_file" ftype =" fasta" value =" test_format.fasta" />
119
141
<param name =" format" value =" fastq.gz" />
120
142
<output name =" outfile" ftype =" fastqsanger.gz" file =" out.fastq.gz" compare =" sim_size" />
121
143
</test >
122
- <test >
144
+ <test expect_num_outputs = " 1 " >
123
145
<param name =" input_file" ftype =" fasta" value =" test_format.fasta" />
124
146
<param name =" format" value =" fasta" />
125
147
<param name =" barcode_threshold" value =" 70" />
0 commit comments