comparison coverm_contig.xml @ 3:c2a5823e4763 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tools/coverm commit 2d02165f40a9f8206a69716b2302bc58f5364982
author iuc
date Wed, 26 Jul 2023 07:35:24 +0000
parents f8cb3f0a19fa
children 1dcea261abbe
comparison
equal deleted inserted replaced
2:f8cb3f0a19fa 3:c2a5823e4763
1 <tool id="coverm_contig" name="CoverM contig" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> 1 <tool id="coverm_contig" name="CoverM contig" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>Calculate coverage of individual contigs</description> 2 <description>Calculate read coverage per contig</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="bio_tools"/>
6 <expand macro="requirements"/> 7 <expand macro="requirements"/>
7 <command><![CDATA[ 8 <command><![CDATA[
8 #if $reads.read_type == "single" or $reads.read_type == "interleaved" 9 #import re
9 mkdir -p reads1 && 10 #import os
10 #set file_paths1 = [] 11
11 #for $input_file in $reads.single 12 #set $single_fp = []
12 13 #set $fw_fp = []
13 #set $fname = $input_file.element_identifier.replace(" ","_") 14 #set $rv_fp = []
14 #set $file_path = 'reads1/' + $fname 15 #set $interl_fp = []
15 ln -s '$input_file' '$file_path' && 16 #set $ref_fp = []
16 $file_paths1.append($file_path) 17 #set $bam_fp = []
17 #end for 18
18 #else if $reads.read_type == "bam" 19 mkdir 'single/' &&
19 mkdir -p bam && 20 mkdir 'fw/' &&
20 #set bam_files = [] 21 mkdir 'rv/' &&
21 #for $input_file in $reads.bam 22 mkdir 'interl/' &&
22 23 mkdir 'ref/' &&
23 #set $fname = $input_file.element_identifier.replace(" ","_") 24 mkdir 'bam/' &&
24 #set $file_path = 'bam/' + $fname 25
25 ln -s '$input_file' '$file_path' && 26 #if $mapped.mapped == 'mapped'
26 $bam_files.append($file_path) 27 @BAMS@
27 #end for 28 #else
28 #else if $reads.read_type == "paired" 29 #if $mapped.mode.mode == 'individual'
29 mkdir -p paired_reads1 && 30 @INDIVIDUAL_ASSEMBLY_READS@
30 #set fw_reads1 = [] 31 #set $ref = $mapped.mode.reference
31 #for $input_file in $reads.read1 32 @INDIVIDUAL_ASSEMBLY_REF@
32 33 #else
33 #set $fname = $input_file.element_identifier.replace(" ","_") 34 @CO_ASSEMBLY_ALL_READS@
34 #set $file_path = 'paired_reads1/' + str($fname) 35 #set $refs = $mapped.mode.reference
35 ln -s '$input_file' '$file_path' && 36 @CO_ASSEMBLY_REF@
36 $fw_reads1.append($file_path) 37 #end if
37 #end for 38 #end if
38 #set rv_reads1 = [] 39
39 #for $input_file in $reads.read2 40 coverm
40 41 contig
41 #set $fname = $input_file.element_identifier.replace(" ","_") 42 #if $mapped.mapped == 'mapped'
42 #set $file_path = 'paired_reads1/' + str($fname) 43 -b
43 ln -s '$input_file' '$file_path' && 44 #for $bam in $bam_fp
44 $rv_reads1.append($file_path) 45 '$bam'
45 #end for 46 #end for
46 #silent $fw_reads1.sort() 47 $mapped.sharded
47 #silent $rv_reads1.sort() 48 #else
48 #else 49 #if $fw_fp
49 mkdir -p paired_reads && 50 -1
50 #set paired_reads1 = [] 51 #for $read in $fw_fp
51 #for $i, $input_file in enumerate($reads.paired_reads) 52 '$read'
52 #set $file_path = 'paired_reads/fw' + str($i) 53 #end for
53 ln -s '$input_file.forward' '$file_path' && 54 -2
54 $paired_reads1.append($file_path) 55 #for $read in $rv_fp
55 #set $file_path = 'paired_reads/rv' + str($i) 56 '$read'
56 ln -s '$input_file.reverse' '$file_path' && 57 #end for
57 $paired_reads1.append($file_path) 58 #else if $single_fp
58 #end for 59 --single
59 #end if 60 #for $read in $single_fp
60 #if $add_reads.extra_read.read_type == "single" or $add_reads.extra_read.read_type == "interleaved" 61 '$read'
61 mkdir -p add_reads1 && 62 #end for
62 #set add_file_paths1 = [] 63 #else if $interl_fp
63 #for $input_file in $add_reads.extra_read.single 64 --interleaved
64 #set $fname = $input_file.element_identifier.replace(" ","_") 65 #for $read in $interl_fp
65 #set $file_path = 'add_reads1/' + $fname 66 '$read'
66 ln -s '$input_file' '$file_path' && 67 #end for
67 $add_file_paths1.append($file_path) 68 #end if
68 #end for 69 --reference
69 #else if $add_reads.extra_read.read_type == "bam" 70 #for $ref in $ref_fp
70 mkdir -p add_bam && 71 '$ref'
71 #set add_bam_files = [] 72 #end for
72 #for $input_file in $reads.bam 73 #if $mapped.mode.mode == 'co'
73 #set $fname = $input_file.element_identifier.replace(" ","_") 74 $mapped.mode.sharded
74 #set $file_path = 'add_bam/' + $fname 75 #end if
75 ln -s '$input_file' '$file_path' && 76 --mapper '$mapped.mapper'
76 $add_bam_files.append($file_path) 77 #end if
77 #end for 78
78 #else if $add_reads.extra_read.read_type == "paired" 79 --min-read-aligned-length $alignment.min_read_aligned_length
79 mkdir -p add_paired_reads1 && 80 --min-read-percent-identity $alignment.min_read_percent_identity
80 #set add_fw_reads1 = [] 81 --min-read-aligned-percent $alignment.min_read_aligned_percent
81 #for $input_file in $add_reads.extra_read.read1 82 $alignment.proper_pairs_only.proper_pairs_only
82 #set $fname = $input_file.element_identifier.replace(" ","_") 83 #if $alignment.proper_pairs_only.proper_pairs_only != ''
83 #set $file_path = 'add_paired_reads1/' + str($fname) 84 --min-read-aligned-length-pair $alignment.proper_pairs_only.min_read_aligned_length_pair
84 ln -s '$input_file' '$file_path' && 85 --min-read-percent-identity-pair $alignment.proper_pairs_only.min_read_percent_identity_pair
85 $add_fw_reads1.append($file_path) 86 --min-read-aligned-percent-pair $alignment.proper_pairs_only.min_read_aligned_percent_pair
86 #end for 87 #end if
87 #set add_rv_reads1 = [] 88
88 #for $input_file in $add_reads.extra_read.read2 89 --methods
89 #set $fname = $input_file.element_identifier.replace(" ","_") 90 #for method in $cov.methods
90 #set $file_path = 'add_paired_reads1/' + str($fname) 91 '$method'
91 ln -s '$input_file' '$file_path' && 92 #end for
92 $add_rv_reads1.append($file_path) 93 --min-covered-fraction $cov.min_covered_fraction
93 #end for 94 --contig-end-exclusion $cov.contig_end_exclusion
94 #silent $add_fw_reads1.sort() 95 --trim-min $cov.trim_min
95 #silent $add_rv_reads1.sort() 96 --trim-max $cov.trim_max
96 #else if $add_reads.extra_read.read_type == "paired_collection" 97
97 mkdir -p add_paired_reads && 98 --output-format '$output_format'
98 #set add_paired_reads1 = [] 99 --output-file '$output'
99 #for $i, $input_file in enumerate($add_reads.extra_read.paired_reads) 100 --threads \${GALAXY_SLOTS:-1}
100 #set $ext = $input_file.forward.ext
101 #set $file_path = 'add_paired_reads/fw' + str($i) + '.' + $ext
102 ln -s '$input_file.forward' '$file_path' &&
103 $add_paired_reads1.append($file_path)
104 #set $file_path = 'add_paired_reads/rv' + str($i) + '.' + $ext
105 ln -s '$input_file.reverse' '$file_path' &&
106 $add_paired_reads1.append($file_path)
107 #end for
108 #end if
109
110 #if $reads.ref_fasta_history
111 mkdir -p reference &&
112 #set ref_files = []
113 #for $input_file in $reads.ref_fasta_history
114 #set $fname = $input_file.element_identifier.replace(" ","_")
115 #set $file_path = 'reference/' + $fname
116 ln -s '$input_file' '$file_path' &&
117 $ref_files.append($file_path)
118 #end for
119 #end if
120
121 coverm contig
122 #if $reads.read_type == 'paired'
123 -1
124 #for $read in $fw_reads1
125 '${read}'
126 #end for
127 -2
128 #for $read in $rv_reads1
129 '${read}'
130 #end for
131 #else if $reads.read_type == 'paired_collection'
132 --coupled
133 #for $read in $paired_reads1
134 '${read}'
135 #end for
136 #else if $reads.read_type == 'single'
137 --single
138 #for $read in $file_paths1
139 '${read}'
140 #end for
141 #else if $reads.read_type == 'interleaved'
142 --interleaved
143 #for $read in $file_paths1
144 '${read}'
145 #end for
146 #else if $reads.read_type == 'bam'
147 -b
148 #for $read in $bam_files
149 '${read}'
150 #end for
151 #end if
152
153 #if $add_reads.extra_read.read_type == 'paired'
154 -1
155 #for $read in $add_fw_reads1
156 '${read}'
157 #end for
158 -2
159 #for $read in $add_rv_reads1
160 '${read}'
161 #end for
162 #else if $add_reads.extra_read.read_type == 'paired_collection'
163 --coupled
164 #for $read in $add_paired_reads1
165 '${read}'
166 #end for
167 #else if $add_reads.extra_read.read_type == 'single'
168 --single
169 #for $read in $add_file_paths1
170 '${read}'
171 #end for
172 #else if $add_reads.extra_read.read_type == 'interleaved'
173 --interleaved
174 #for $read in $add_file_paths1
175 '${read}'
176 #end for
177 #else if $add_reads.extra_read.read_type == 'bam'
178 #for $read in $add_bam_files
179 '${read}'
180 #end for
181 #end if
182
183
184 #if $reads.ref_fasta_history:
185 --reference
186 #for $reference in $ref_files
187 '${reference}'
188 #end for
189 #end if
190
191 $shar.sharded
192
193 #if $mapping.mapper:
194 --mapper $mapping.mapper
195 #end if
196 #if $mapping.min_read_aligned_length:
197 --min-read-aligned-length $mapping.min_read_aligned_length
198 #end if
199 #if $mapping.min_read_percent_identity:
200 --min-read-percent-identity $mapping.min_read_percent_identity
201 #end if
202 #if $mapping.min_read_aligned_percent:
203 --min-read-aligned-percent $mapping.min_read_aligned_percent
204 #end if
205 #if $mapping.min_read_aligned_length_pair:
206 --min-read-aligned-length-pair $mapping.min_read_aligned_length_pair
207 #end if
208 #if $mapping.min_read_percent_identity_pair:
209 --min-read-percent-identity-pair $mapping.min_read_percent_identity_pair
210 #end if
211 #if $mapping.min_read_aligned_percent_pair:
212 --min-read-aligned-percent-pair $mapping.min_read_aligned_percent_pair
213 #end if
214 $mapping.proper_pairs_only
215 $mapping.exclude_supplementary
216
217 --methods $cov.relative_abundance $cov.mean $cov.cond_methods.trimmed_mean $cov.covered_bases $cov.covered_fraction
218 $cov.variance $cov.length $cov.count $cov.metabat $cov.coverage_histogram $cov.reads_per_base
219 $cov.rpkm $cov.tpm
220 #if $cov.min_covered_fraction:
221 --min-covered-fraction $cov.min_covered_fraction
222 #end if
223 #if $cov.contig_end_exclusion:
224 --contig-end-exclusion $cov.contig_end_exclusion
225 #end if
226 #if $cov.cond_methods.trimmed_mean == "trimmed_mean"
227 #if $cov.cond_methods.trim_min:
228 --trim-min $cov.cond_methods.trim_min
229 #end if
230 #if $cov.cond_methods.trim_max:
231 --trim_max $cov.cond_methods.trim_max
232 #end if
233 #end if
234
235 #if $out.output_format:
236 --output-format $out.output_format
237 #end if
238 --output-file output.tsv
239 --threads \${GALAXY_SLOTS:-1}
240 ]]></command> 101 ]]></command>
241 <inputs> 102 <inputs>
242 <expand macro="reads_for_contig" /> 103 <conditional name="mapped">
243 <expand macro="add_reads" /> 104 <expand macro="mapped"/>
244 <section name="shar" title="Sharding" expanded="false"> 105 <when value="mapped">
245 <param name="sharded" type="boolean" optional="true" truevalue="--sharded" falsevalue="" label="If -b/--bam-files was used: Input BAM files are read-sorted alignments of a set of reads mapped to multiple reference contig sets. Choose the best hit for each read pair. Otherwise if mapping was carried out: Map reads to each reference, choosing the best hit for each pair." /> 106 <expand macro="mapped_params"/>
107 </when>
108 <when value="not-mapped">
109 <conditional name="mode">
110 <expand macro="assembly_mode"/>
111 <when value="individual">
112 <expand macro="individual_assembly_reads"/>
113 <expand macro="individual_assembly_reference"/>
114 </when>
115 <when value="co">
116 <expand macro="co_assembly_reads"/>
117 <repeat name="extra_reads" title="Additional reads">
118 <expand macro="co_assembly_reads"/>
119 </repeat>
120 <expand macro="co_assembly_reference"/>
121 </when>
122 </conditional>
123 <expand macro="mapping"/>
124 </when>
125 </conditional>
126 <expand macro="alignment"/>
127 <section name="cov" title="Coverage calculation options" expanded="false">
128 <param argument="--methods" type="select" multiple="true" label="Method(s) for calculating coverage">
129 <option value="mean" selected="true">mean: Average number of aligned reads overlapping each position on the contig</option>
130 <expand macro="cov_method_options"/>
131 </param>
132 <expand macro="coverage_params"/>
246 </section> 133 </section>
247 <expand macro="mapping"/> 134 <expand macro="output_format"/>
248 <expand macro="coverage"/>
249 <section name="out" title="Output options" expanded="false">
250 <param name="output_format" type="select" label="Shape of output" help="'Sparse' for long format, 'dense' for species-by-site. Default: dense]">
251 <option value="dense" selected="true">Dense</option>
252 <option value="sparse">Sparse</option>
253 </param>
254 </section>
255 </inputs> 135 </inputs>
256 <outputs> 136 <outputs>
257 <data name="output1" format="tsv" from_work_dir="./output.tsv"/> 137 <data name="output" format="tabular"/>
258 </outputs> 138 </outputs>
259 <tests> 139 <tests>
260 <test> 140 <test expect_num_outputs="1">
261 <conditional name="reads"> 141 <conditional name="mapped">
262 <param name="read_type" value="paired_collection"/> 142 <param name="mapped" value="not-mapped" />
263 <param name="paired_reads"> 143 <conditional name="mode">
264 <collection type="list:paired"> 144 <param name="mode" value="co"/>
265 <element name="reads_for_seq1_and_seq2..fq"> 145 <conditional name="read_type">
266 <collection type="paired"> 146 <param name="type" value="paired_collection"/>
267 <element name="forward" value="reads_for_seq1_and_seq2.1.fq.gz"/> 147 <param name="paired_reads">
268 <element name="reverse" value="reads_for_seq1_and_seq2.2.fq.gz"/> 148 <collection type="list:paired">
149 <element name="reads_for_seq1_and_seq2">
150 <collection type="paired">
151 <element name="forward" value="reads_for_seq1_and_seq2.1.fq.gz" ftype="fastqsanger.gz"/>
152 <element name="reverse" value="reads_for_seq1_and_seq2.2.fq.gz" ftype="fastqsanger.gz"/>
153 </collection>
154 </element>
269 </collection> 155 </collection>
270 </element> 156 </param>
271 </collection> 157 </conditional>
272 </param> 158 <param name="reference" value="7seqs.fna" />
273 <param name="ref_fasta_history" value="7seqs.fna"/> 159 <param name="sharded" value="" />
274 </conditional> 160 </conditional>
275 <output name="output1" file="contig_test1.tsv" ftype="tsv" sort="true"/> 161 </conditional>
276 </test> 162 <section name="alignment">
277 <test> 163 <param name="min_read_aligned_length" value="0" />
278 <conditional name="reads"> 164 <param name="min_read_percent_identity" value="0" />
279 <param name="read_type" value="single"/> 165 <param name="min_read_aligned_percent" value="0" />
280 <param name="single" value="bad_reads.interleaved.fq"/> 166 <conditional name="proper_pairs_only">
281 <param name="ref_fasta_history" value="2seqs.fasta"/> 167 <param name="proper_pairs_only" value=""/>
282 </conditional> 168 </conditional>
283 <section name="cov"> 169 <param name="exclude_supplementary" value=""/>
170 </section>
171 <section name="cov">
172 <param name="methods" value="mean"/>
173 <param name="trim_min" value="5"/>
174 <param name="trim_max" value="95"/>
175 <param name="min_covered_fraction" value="10"/>
176 <param name="contig_end_exclusion" value="75"/>
177 </section>
178 <param name="output_format" value="dense"/>
179 <output name="output" ftype="tabular">
180 <assert_contents>
181 <has_text text="Contig"/>
182 <has_text text="Mean"/>
183 <has_text text="7seqs.fna"/>
184 <has_text text="genome1~random_sequence_length_11000"/>
185 <has_text text="genome2~seq1"/>
186 </assert_contents>
187 </output>
188 </test>
189 <test expect_num_outputs="1">
190 <conditional name="mapped">
191 <param name="mapped" value="not-mapped" />
192 <conditional name="mode">
193 <param name="mode" value="individual"/>
194 <conditional name="read_type">
195 <param name="type" value="paired"/>
196 <param name="read1" value="reads_for_seq1_and_seq2.1.fq.gz" ftype="fastqsanger.gz"/>
197 <param name="read2" value="reads_for_seq1_and_seq2.2.fq.gz" ftype="fastqsanger.gz"/>
198 </conditional>
199 <param name="reference" value="7seqs.fna" />
200 <param name="sharded" value="" />
201 </conditional>
202 </conditional>
203 <section name="alignment">
204 <param name="min_read_aligned_length" value="0" />
205 <param name="min_read_percent_identity" value="0" />
206 <param name="min_read_aligned_percent" value="0" />
207 <conditional name="proper_pairs_only">
208 <param name="proper_pairs_only" value=""/>
209 </conditional>
210 <param name="exclude_supplementary" value=""/>
211 </section>
212 <section name="cov">
213 <param name="methods" value="mean"/>
214 <param name="trim_min" value="5"/>
215 <param name="trim_max" value="95"/>
216 <param name="min_covered_fraction" value="10"/>
217 <param name="contig_end_exclusion" value="75"/>
218 </section>
219 <param name="output_format" value="dense"/>
220 <output name="output" ftype="tabular">
221 <assert_contents>
222 <has_text text="Contig"/>
223 <has_text text="Mean"/>
224 <has_text text="7seqs.fna"/>
225 <has_text text="genome1~random_sequence_length_11000"/>
226 <has_text text="genome2~seq1"/>
227 </assert_contents>
228 </output>
229 </test>
230 <test expect_num_outputs="1">
231 <conditional name="mapped">
232 <param name="mapped" value="not-mapped" />
233 <conditional name="mode">
234 <param name="mode" value="co"/>
235 <conditional name="read_type">
236 <param name="type" value="single"/>
237 <param name="single" value="bad_reads.interleaved.fq"/>
238 </conditional>
239 <param name="reference" value="2seqs.fasta" />
240 <param name="sharded" value="" />
241 </conditional>
242 </conditional>
243 <section name="alignment">
244 <param name="min_read_aligned_length" value="0" />
245 <param name="min_read_percent_identity" value="0" />
246 <param name="min_read_aligned_percent" value="0" />
247 <conditional name="proper_pairs_only">
248 <param name="proper_pairs_only" value=""/>
249 </conditional>
250 <param name="exclude_supplementary" value=""/>
251 </section>
252 <section name="cov">
253 <param name="methods" value="mean"/>
254 <param name="trim_min" value="5"/>
255 <param name="trim_max" value="95"/>
256 <param name="min_covered_fraction" value="10"/>
284 <param name="contig_end_exclusion" value="0"/> 257 <param name="contig_end_exclusion" value="0"/>
285 </section> 258 </section>
286 <section name="out"> 259 <param name="output_format" value="sparse"/>
287 <param name="output_format" value="sparse"/> 260 <output name="output" ftype="tabular">
288 </section> 261 <assert_contents>
289 <output name="output1" file="contig_test2.tsv" ftype="tsv" sort="true"/> 262 <has_text text="Contig"/>
290 </test> 263 <has_text text="Mean"/>
291 <test> 264 <has_text text="Sample"/>
292 <conditional name="reads"> 265 <has_text text="2seqs.fasta_0/bad_reads.interleaved.fq_single_0"/>
293 <param name="read_type" value="interleaved"/> 266 <has_text text="seq2"/>
294 <param name="single" value="bad_reads.all.interleaved.fa"/> 267 </assert_contents>
295 <param name="ref_fasta_history" value="2seqs.fasta"/> 268 </output>
296 </conditional> 269 </test>
297 <section name="cov"> 270 <test expect_num_outputs="1">
271 <conditional name="mapped">
272 <param name="mapped" value="not-mapped" />
273 <conditional name="mode">
274 <param name="mode" value="co"/>
275 <conditional name="read_type">
276 <param name="type" value="interleaved"/>
277 <param name="interleaved" value="bad_reads.all.interleaved.fa"/>
278 </conditional>
279 <param name="reference" value="2seqs.fasta" />
280 <param name="sharded" value="" />
281 </conditional>
282 </conditional>
283 <section name="alignment">
284 <param name="min_read_aligned_length" value="0" />
285 <param name="min_read_percent_identity" value="0" />
286 <param name="min_read_aligned_percent" value="0" />
287 <conditional name="proper_pairs_only">
288 <param name="proper_pairs_only" value=""/>
289 </conditional>
290 <param name="exclude_supplementary" value=""/>
291 </section>
292 <section name="cov">
293 <param name="methods" value="mean"/>
294 <param name="trim_min" value="5"/>
295 <param name="trim_max" value="95"/>
296 <param name="min_covered_fraction" value="10"/>
298 <param name="contig_end_exclusion" value="0"/> 297 <param name="contig_end_exclusion" value="0"/>
299 </section> 298 </section>
300 <section name="mapping"> 299 <param name="output_format" value="sparse"/>
301 <param name="min_read_aligned_length_pair" value="300"/> 300 <output name="output" ftype="tabular">
302 <param name="proper_pairs_only" value="true"/> 301 <assert_contents>
303 </section> 302 <has_text text="Contig"/>
304 <section name="out"> 303 <has_text text="Mean"/>
305 <param name="output_format" value="sparse"/> 304 <has_text text="Sample"/>
306 </section> 305 <has_text text="2seqs.fasta_0/bad_reads.all.interleaved.fa_interleaved_0"/>
307 <output name="output1" file="contig_test3.tsv" ftype="tsv" sort="true"/> 306 <has_text text="seq1"/>
308 </test> 307 <has_text text="seq2"/>
309 <test> 308 </assert_contents>
310 <conditional name="reads"> 309 </output>
311 <param name="read_type" value="paired"/> 310 </test>
312 <param name="read1" value="reads_for_seq1_and_seq2.1.fq.gz"/> 311 <test expect_num_outputs="1">
313 <param name="read2" value="reads_for_seq1_and_seq2.2.fq.gz"/> 312 <conditional name="mapped">
314 <param name="ref_fasta_history" value="2seqs.fasta"/> 313 <param name="mapped" value="not-mapped" />
315 </conditional> 314 <conditional name="mode">
316 <section name="add_reads"> 315 <param name="mode" value="co"/>
317 <conditional name="extra_read"> 316 <conditional name="read_type">
318 <param name="read_type" value="paired_collection"/> 317 <param name="type" value="paired"/>
319 <param name="paired_reads"> 318 <param name="read1" value="reads_for_seq1_and_seq2.1.fq.gz"/>
320 <collection type="list:paired"> 319 <param name="read2" value="reads_for_seq1_and_seq2.2.fq.gz"/>
321 <element name="reads_for_seq1_and_seq2..fq"> 320 </conditional>
322 <collection type="paired"> 321 <repeat name="extra_reads">
323 <element name="forward" value="reads_for_seq1_and_seq2.1.fq.gz"/> 322 <conditional name="read_type">
324 <element name="reverse" value="reads_for_seq1_and_seq2.2.fq.gz"/> 323 <param name="type" value="paired_collection"/>
324 <param name="paired_reads">
325 <collection type="list:paired">
326 <element name="reads_for_seq1_and_seq2">
327 <collection type="paired">
328 <element name="forward" value="reads_for_seq1_and_seq2.1.fq.gz" ftype="fastqsanger.gz"/>
329 <element name="reverse" value="reads_for_seq1_and_seq2.2.fq.gz" ftype="fastqsanger.gz"/>
330 </collection>
331 </element>
325 </collection> 332 </collection>
326 </element> 333 </param>
327 </collection> 334 </conditional>
328 </param> 335 </repeat>
329 </conditional> 336 <param name="reference" value="2seqs.fasta" />
330 </section> 337 <param name="sharded" value="" />
331 <section name="cov"> 338 </conditional>
339 </conditional>
340 <section name="alignment">
341 <param name="min_read_aligned_length" value="0" />
342 <param name="min_read_percent_identity" value="0.95" />
343 <param name="min_read_aligned_percent" value="0" />
344 <conditional name="proper_pairs_only">
345 <param name="proper_pairs-only" value=""/>
346 </conditional>
347 <param name="exclude_supplementary" value=""/>
348 </section>
349 <section name="cov">
350 <param name="methods" value="mean"/>
351 <param name="trim_min" value="5"/>
352 <param name="trim_max" value="95"/>
353 <param name="min_covered_fraction" value="10"/>
332 <param name="contig_end_exclusion" value="0"/> 354 <param name="contig_end_exclusion" value="0"/>
333 </section> 355 </section>
334 <section name="mapping"> 356 <param name="output_format" value="sparse"/>
335 <param name="--min-read-percent-identity" value="0.95"/> 357 <output name="output" ftype="tabular">
336 </section> 358 <assert_contents>
337 <output name="output1" file="contig_test4.tsv" ftype="tsv" sort="true"/> 359 <has_text text="Contig"/>
338 </test> 360 <has_text text="Mean"/>
339 <test> 361 <has_text text="Sample"/>
340 <conditional name="reads"> 362 <has_text text="2seqs.fasta_0/reads_for_seq1_and_seq2.1.fq.gz_paired_0"/>
341 <param name="read_type" value="bam"/> 363 <has_text text="2seqs.fasta_0/reads_for_seq1_and_seq2_paired_collection_00"/>
342 <param name="bam" value="tpm_test.bam"/> 364 <has_text text="seq1"/>
343 </conditional> 365 <has_text text="seq2"/>
344 <section name="cov"> 366 </assert_contents>
345 <param name="mean" value="true"/> 367 </output>
346 <param name="tpm" value="true"/> 368 </test>
347 </section> 369 <test expect_num_outputs="1">
348 <section name="out"> 370 <conditional name="mapped">
349 <param name="output_format" value="sparse"/> 371 <param name="mapped" value="mapped" />
350 </section> 372 <conditional name="mode">
351 <output name="output1" file="contig_test5.tsv" ftype="tsv" sort="true"/> 373 <param name="mode" value="co"/>
352 </test> 374 <param name="bam_files" value="tpm_test.bam"/>
353 </tests> 375 <param name="sharded" value="" />
376 </conditional>
377 </conditional>
378 <section name="alignment">
379 <param name="min_read_aligned_length" value="0" />
380 <param name="min_read_percent_identity" value="0.95" />
381 <param name="min_read_aligned_percent" value="0" />
382 <conditional name="proper_pairs_only">
383 <param name="proper_pairs-only" value=""/>
384 </conditional>
385 <param name="exclude_supplementary" value=""/>
386 </section>
387 <section name="cov">
388 <param name="methods" value="mean,tpm"/>
389 <param name="trim_min" value="5"/>
390 <param name="trim_max" value="95"/>
391 <param name="min_covered_fraction" value="10"/>
392 <param name="contig_end_exclusion" value="75"/>
393 </section>
394 <param name="output_format" value="sparse"/>
395 <output name="output" ftype="tabular">
396 <assert_contents>
397 <has_text text="Contig"/>
398 <has_text text="Mean"/>
399 <has_text text="Sample"/>
400 <has_text text="TPM"/>
401 <has_text text="tpm_test"/>
402 <has_text text="genome1~random_sequence_length_11000"/>
403 <has_text text="genome2~seq1"/>
404 <has_text text="genome3~random_sequence_length_11001"/>
405 </assert_contents>
406 </output>
407 </test>
408 <test expect_num_outputs="1">
409 <conditional name="mapped">
410 <param name="mapped" value="mapped" />
411 <conditional name="mode">
412 <param name="mode" value="co"/>
413 <param name="bam_files" value="tpm_test.bam"/>
414 <param name="sharded" value="" />
415 </conditional>
416 </conditional>
417 <section name="alignment">
418 <param name="min_read_aligned_length" value="0" />
419 <param name="min_read_percent_identity" value="0.95" />
420 <param name="min_read_aligned_percent" value="0" />
421 <conditional name="proper_pairs_only">
422 <param name="proper_pairs-only" value=""/>
423 </conditional>
424 <param name="exclude_supplementary" value=""/>
425 </section>
426 <section name="cov">
427 <param name="methods" value="mean,tpm"/>
428 <param name="trim_min" value="5"/>
429 <param name="trim_max" value="95"/>
430 <param name="min_covered_fraction" value="10"/>
431 <param name="contig_end_exclusion" value="75"/>
432 </section>
433 <param name="output_format" value="sparse"/>
434 <output name="output" ftype="tabular">
435 <assert_contents>
436 <has_text text="Contig"/>
437 <has_text text="Mean"/>
438 <has_text text="Sample"/>
439 <has_text text="TPM"/>
440 <has_text text="tpm_test"/>
441 <has_text text="genome1~random_sequence_length_11000"/>
442 <has_text text="genome2~seq1"/>
443 <has_text text="genome3~random_sequence_length_11001"/>
444 </assert_contents>
445 </output>
446 </test>
447 </tests>
354 <help><![CDATA[ 448 <help><![CDATA[
355 .. class:: infomark 449 .. class:: infomark
356 450
357 **Method for calculating coverage** 451 **Method for calculating coverage**
358 452