comparison quality.xml @ 5:b69e898b8109 draft

planemo upload for repository https://github.com/phac-nml/quasitools commit e30c0687f755a46c5b3bd265a1478a1abf5dc9f1
author nml
date Fri, 24 Aug 2018 16:50:28 -0400
parents
children dcd43b402eb3
comparison
equal deleted inserted replaced
4:8cdffc02d2e2 5:b69e898b8109
1 <tool id="quality" name="Quality control" version="0.4.2">
2 <description>Performs quality control on FASTQ reads.</description>
3 <requirements>
4 <requirement type="package" version="0.4.2">quasitools</requirement>
5 </requirements>
6 <command detect_errors="exit_code"><![CDATA[
7
8 quasitools quality
9
10 ## Preparing file input.
11 #if $data_type.type == "paired":
12
13 '$data_type.fastq_input1'
14 '$data_type.fastq_input2'
15
16 #elif $data_type.type == "collection":
17
18 '$data_type.fastq_input1.forward'
19 '$data_type.fastq_input1.reverse'
20
21 #elif $data_type.type == "single":
22
23 '$data_type.fastq_input1'
24
25 #end if
26
27 #if $length_cutoff:
28 -lc '$length_cutoff'
29 #end if
30
31 #if $score_cutoff:
32 -sc '$score_cutoff'
33 #end if
34
35 #if $min_read_qual:
36 -rq '$min_read_qual'
37 #end if
38
39 #if $low_quality.qual_selector == "filter_ns":
40 --ns
41 #elif $low_quality.qual_selector == "mask_reads":
42 --mask_reads
43 #end if
44
45 #if $score_type.score_selector == "median":
46 --median
47 #elif $score_type.score_selector == "mean":
48 --mean
49 #end if
50
51 $trim_reads
52
53 -o output
54
55 ]]></command>
56 <inputs>
57 <conditional name="data_type">
58 <param name="type" type="select" label="Specify the read type.">
59 <option value="single">Single-end Data</option>
60 <option value="paired">Paired-end Data</option>
61 <option value="collection">Collection Paired-end Data</option>
62 </param>
63 <when value="single">
64 <param name="fastq_input1" type="data" format="fastq" label="Single end read file(s)"/>
65 </when>
66 <when value="paired">
67 <param name="fastq_input1" type="data" format="fastq" label="Forward paired-end read file"/>
68 <param name="fastq_input2" type="data" format="fastq" label="Reverse paired-end read file"/>
69 </when>
70 <when value="collection">
71 <param name="fastq_input1" type="data_collection" label="Paired-end reads collection" optional="false" format="fastq" collection_type="paired" />
72 </when>
73 </conditional>
74 <param name="length_cutoff" type="integer" optional="true" min="1" max="1000" label="Length cutoff" value="100" help="Reads which fall short of the specified length will be filtered out. Defaults to 100." />
75 <param name="score_cutoff" type="integer" optional="true" min="0" max="40" label="Score cutoff" value="30" help="Reads whose median or mean quality score (depending on the score type specified) is less than the specified score cutoff value will be filtered out. Defaults to 30." />
76 <param name="min_read_qual" type="integer" optional="true" min="1" max="100" label="Minimum quality" value="30" help="Minimum required quality for a position in a read not to be masked, is masking is enabled. Defaults to 30." />
77 <param name="trim_reads" type="boolean" optional="true" checked="false" truevalue="-tr" falsevalue="" label="Trim reads" help="Iteratively trim reads based on filter values if enabled." />
78 <conditional name="low_quality">
79 <param name="qual_selector" type="select" label="Filter out regions masked, or mask low coverage regions with n's." multiple="false" display="radio">
80 <option value="filter_ns">Filter out regions with n's</option>
81 <option value="mask_reads">Mask low coverage regions with n's</option>
82 <option value="neither" selected="true">Do not filter or mask low coverage regions.</option>
83 </param>
84 <when value="filter_ns">
85 </when>
86 <when value="mask_reads">
87 </when>
88 <when value="neither">
89 </when>
90 </conditional>
91 <conditional name="score_type">
92 <param name="score_selector" type="select" label="Use either median score (default) or mean score for the score cutoff value." multiple="false" display="radio">
93 <option value="median" selected="true">Use median score</option>
94 <option value="mean">Use mean score</option>
95 </param>
96 <when value="median">
97 </when>
98 <when value="mean">
99 </when>
100 </conditional>
101 </inputs>
102 <outputs>
103 <data format="fastq" label="Quality control output" name="output_filtered" from_work_dir="output/filtered.fastq" />
104 </outputs>
105 <tests>
106 <test>
107 <param name="type" value="single"/>
108 <param name="fastq_input1" value="forward.fastq" />
109 <param name="score_selector" value="median" />
110 <output name="output_filtered">
111 <assert_contents>
112 <has_text text="@M01647:10:000000000-ACPHB:1:1101:18589:1580 1:N:0:86" />
113 <has_text text="CCCCCGG@FFGGGGGGGGGGGGCGGGGGGGGDGFFFGGGGGDEGCFGCFFFGGGGGGGGGGGGGGGGFGGGGGGGGGGFCFCGGGGCGFGGGGFGEGGGGGGGGGGGGGGGGGGGGGFEFGGGGGGF" />
114 </assert_contents>
115 </output>
116 </test>
117 <test>
118 <param name="type" value="single"/>
119 <param name="fastq_input1" value="forward.fastq" />
120 <param name="score_selector" value="median" />
121 <param name="qual_selector" value="filter_ns" />
122 <output name="output_filtered">
123 <assert_contents>
124 <has_text text="@M01647:10:000000000-ACPHB:1:1101:18589:1580 1:N:0:86" />
125 <has_text text="CCCCCGG@FFGGGGGGGGGGGGCGGGGGGGGDGFFFGGGGGDEGCFGCFFFGGGGGGGGGGGGGGGGFGGGGGGGGGGFCFCGGGGCGFGGGGFGEGGGGGGGGGGGGGGGGGGGGGFEFGGGGGGF" />
126 </assert_contents>
127 </output>
128 </test>
129 <test>
130 <param name="type" value="single"/>
131 <param name="fastq_input1" value="forward.fastq" />
132 <param name="score_selector" value="median" />
133 <param name="trim_reads" value="-tr" />
134 <output name="output_filtered">
135 <assert_contents>
136 <has_text text="@M01647:10:000000000-ACPHB:1:1101:18589:1580 1:N:0:86" />
137 <has_text text="CCCCCGG@FFGGGGGGGGGGGGCGGGGGGGGDGFFFGGGGGDEGCFGCFFFGGGGGGGGGGGGGGGGFGGGGGGGGGGFCFCGGGGCGFGGGGFGEGGGGGGGGGGGGGGGGGGGGGFEFGGGGGGF" />
138 </assert_contents>
139 </output>
140 </test>
141 <test>
142 <param name="type" value="single"/>
143 <param name="fastq_input1" value="forward.fastq" />
144 <param name="score_selector" value="median" />
145 <param name="qual_selector" value="mask_reads" />
146 <output name="output_filtered">
147 <assert_contents>
148 <has_text text="@M01647:10:000000000-ACPHB:1:1101:18589:1580 1:N:0:86" />
149 <has_text text="NNNNNNTACCACATCCCNCNNNNTTNNNNNNNNNNANNTCNNTNNCNNTNCTNNNTNTNNNTGNTGCNTNTTTTTCAGTTCCCTTNGNTGNNGNCTTCAGNNNNTATACTGCATTTACCNTNCNT" />
150 </assert_contents>
151 </output>
152 </test>
153 <test>
154 <param name="type" value="single"/>
155 <param name="fastq_input1" value="forward.fastq" />
156 <param name="score_selector" value="mean" />
157 <output name="output_filtered">
158 <assert_contents>
159 <has_text text="@M01647:10:000000000-ACPHB:1:1101:10485:1674 1:N:0:86" />
160 <has_text text="CCCCCGG@FFGGGGGGGGGGGGCGGGGGGGGDGFFFGGGGGDEGCFGCFFFGGGGGGGGGGGGGGGGFGGGGGGGGGGFCFCGGGGCGFGGGGFGEGGGGGGGGGGGGGGGGGGGGGFEFGGGGGGF" />
161 </assert_contents>
162 </output>
163 </test>
164 </tests>
165 <help><![CDATA[
166 Quality Control
167 ===============
168
169 Perform quality control on FASTQ reads.]]></help>
170 <citations>
171 </citations>
172 </tool>