comparison crosscontamination_barcode_filter.xml @ 1:253c9448f524 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/crosscontamination_barcode_filter commit f967afe562781e5c8ed4e24e9d1e0bc3ebb29401
author iuc
date Mon, 03 Jun 2019 14:55:24 -0400
parents 582b7bd4ae4c
children 5ade5cf200da
comparison
equal deleted inserted replaced
0:582b7bd4ae4c 1:253c9448f524
1 <tool id="crosscontamination_barcode_filter" name="Cross-contamination Barcode Filter" version="@VERSION@"> 1 <tool id="crosscontamination_barcode_filter" name="Cross-contamination Barcode Filter" version="@VERSION@">
2 <description>for use in plate-based barcoded analyses</description> 2 <description>for use in plate-based barcoded analyses</description>
3 <macros> 3 <macros>
4 <token name="@VERSION@">0.1</token> 4 <token name="@VERSION@">0.2</token>
5 <macro name="assert_conts" >
6 <assert_contents>
7 <has_text text="/CreationDate" />
8 <has_text text="/Producer" />
9 <has_line line="startxref" />
10 <has_line line="%%EOF" />
11 </assert_contents>
12 </macro>
13 <macro name="sanitize_batch"> 5 <macro name="sanitize_batch">
14 <sanitizer invalid_char=""> 6 <sanitizer invalid_char="">
15 <valid initial="string.digits"> 7 <valid initial="string.digits">
16 <add value=","/> 8 <add value=","/>
17 </valid> 9 </valid>
33 <add value="&#93;"/> <!-- right square bracket --> 25 <add value="&#93;"/> <!-- right square bracket -->
34 <add value="&#40;"/> <!-- left parenthesis --> 26 <add value="&#40;"/> <!-- left parenthesis -->
35 <add value="&#41;"/> <!-- right parenthesis --> 27 <add value="&#41;"/> <!-- right parenthesis -->
36 </valid> 28 </valid>
37 </sanitizer> 29 </sanitizer>
38 </macro> 30 </macro>
39 </macros> 31 </macros>
40 <requirements> 32 <requirements>
41 <requirement type="package" version="2.2.1" >r-ggplot2</requirement> 33 <requirement type="package" version="3.1.1">r-ggplot2</requirement>
34 <requirement type="package" version="1.12.2">r-data.table </requirement>
42 </requirements> 35 </requirements>
43 <version_command><![CDATA[ 36 <version_command><![CDATA[
44 Rscript '$__tool_directory__/scripts/crosscontamination_filter.R' | head -1 | cut -d' ' -f 2 37 Rscript '$__tool_directory__/scripts/crosscontamination_filter.R' | head -1 | cut -d' ' -f 2
45 ]]></version_command> 38 ]]></version_command>
46 <command detect_errors="exit_code"><![CDATA[ 39 <command detect_errors="exit_code"><![CDATA[
59 input_matrix[is.na(input_matrix)] <- 0 52 input_matrix[is.na(input_matrix)] <- 0
60 #if str($inbuilt_spec.select_use) == "mpi_sagar": 53 #if str($inbuilt_spec.select_use) == "mpi_sagar":
61 spec = list( 54 spec = list(
62 barcodes = '$input_barcodes', 55 barcodes = '$input_barcodes',
63 format = list( 56 format = list(
64 "1-96" = c(1,3,5,7), 57 "1-96" = c(1,3),
65 "97-192" = c(2,4,6,8) 58 "97-192" = c(2,4)
66 ), 59 ),
67 plates = list( 60 plates = list(
68 "1" = c(1,2,3,4), 61 "1" = c(1,2),
69 "2" = c(5,6,7,8) 62 "2" = c(3,4)
70 ) 63 )
71 ) 64 )
72 #elif str($inbuilt_spec.select_use) == "custom": 65 #elif str($inbuilt_spec.select_use) == "custom":
73 spec = list( 66 spec = list(
74 barcodes = '$input_barcodes', 67 barcodes = '$input_barcodes',
75 format = list( 68 format = list(
76 #for $i, $s in enumerate($inbuilt_spec.barcode_format) 69 #for $i, $s in enumerate($inbuilt_spec.barcode_format)
77 "${s.range_start}-${s.range_end}" = c( ${s.batches} ) 70 "${s.range_start}-${s.range_end}" = c( ${s.batches} )
78 #if $i < len(list($inbuilt_spec.barcode_format)) - 1 71 #if $i < len(list($inbuilt_spec.barcode_format)) - 1
79 , 72 ,
80 #end if 73 #end if
81 #end for 74 #end for
82 ), 75 ),
121 </param> 114 </param>
122 </repeat> 115 </repeat>
123 </when> 116 </when>
124 </conditional> 117 </conditional>
125 <section name="advanced" expanded="false" title="RegEx Parameters" > 118 <section name="advanced" expanded="false" title="RegEx Parameters" >
126 <param name="regex_extract" type="text" value=".*P(\\d)_(\\d)_([ACTG]+)" label="RegEx to extract Plate, Batch, and Barcodes from headers" > 119 <param name="regex_extract" type="text" value=".*P(\\d)_B(\\d)_([ACTG]+)" label="RegEx to extract Plate, Batch, and Barcodes from headers" >
127 <expand macro="sanitize_regex" /> 120 <expand macro="sanitize_regex" />
128 </param> 121 </param>
129 <param name="regex_display" type="text" value="P\\1_B\\2_\\3" label="RegEx to replace Plate, Batch, and Barcodes from headers" > 122 <param name="regex_display" type="text" value="P\\1_B\\2_\\3" label="RegEx to replace Plate, Batch, and Barcodes from headers" >
130 <expand macro="sanitize_regex" /> 123 <expand macro="sanitize_regex" />
131 </param> 124 </param>
135 <data name="out_plots" format="pdf" label="${tool.name} on ${on_string}: Plots" /> 128 <data name="out_plots" format="pdf" label="${tool.name} on ${on_string}: Plots" />
136 <data name="out_table" format="tabular" label="${tool.name} on ${on_string}: Filtered Table" /> 129 <data name="out_table" format="tabular" label="${tool.name} on ${on_string}: Filtered Table" />
137 </outputs> 130 </outputs>
138 <tests> 131 <tests>
139 <test><!-- Inbuilt MPI --> 132 <test><!-- Inbuilt MPI -->
140 <param name="input_table" value="out3.subtable" /> 133 <param name="input_table" value="test.matrix" />
141 <param name="input_barcodes" value="celseq_barcodes.192.raw" /> 134 <param name="input_barcodes" value="celseq_barcodes.192.raw" />
142 <conditional name="inbuilt_spec" > 135 <conditional name="inbuilt_spec" >
143 <param name="select_use" value="mpi_sagar" /> 136 <param name="select_use" value="mpi_sagar" />
144 </conditional> 137 </conditional>
145 <output name="out_plots" > 138 <output name="out_plots" value="out.pdf" compare="sim_size" />
146 <expand macro="assert_conts" /> 139 <output name="out_table" value="out.table" />
147 </output>
148 <output name="out_table" value="test.table" />
149 </test> 140 </test>
150 <test><!-- Plate and Lane test --> 141 <test><!-- Plate and Lane test -->
151 <param name="input_table" value="out3.subtable" /> 142 <param name="input_table" value="test.matrix" />
152 <param name="input_barcodes" value="celseq_barcodes.192.raw" /> 143 <param name="input_barcodes" value="celseq_barcodes.192.raw" />
153 <conditional name="inbuilt_spec" > 144 <conditional name="inbuilt_spec" >
154 <param name="select_use" value="custom" /> 145 <param name="select_use" value="custom" />
155 <repeat name="barcode_format" > 146 <repeat name="barcode_format" >
156 <param name="range_start" value="1"/> 147 <param name="range_start" value="1"/>
157 <param name="range_end" value="96" /> 148 <param name="range_end" value="96" />
158 <param name="batches" value="1,3,5,7" /> 149 <param name="batches" value="1,3" />
159 </repeat> 150 </repeat>
160 <repeat name="barcode_format" > 151 <repeat name="barcode_format" >
161 <param name="range_start" value="97"/> 152 <param name="range_start" value="97"/>
162 <param name="range_end" value="192" /> 153 <param name="range_end" value="192" />
163 <param name="batches" value="2,4,6,8" /> 154 <param name="batches" value="2,4" />
164 </repeat> 155 </repeat>
165 <repeat name="plate_format" > 156 <repeat name="plate_format" >
166 <param name="plate" value="1" /> 157 <param name="plate" value="1" />
167 <param name="batches" value="1,2,3,4" /> 158 <param name="batches" value="1,2" />
168 </repeat> 159 </repeat>
169 <repeat name="plate_format" > 160 <repeat name="plate_format" >
170 <param name="plate" value="2" /> 161 <param name="plate" value="2" />
171 <param name="batches" value="5,6,7,8" /> 162 <param name="batches" value="3,4" />
172 </repeat> 163 </repeat>
173 </conditional> 164 </conditional>
174 <output name="out_plots" > 165 <output name="out_plots" value="out.pdf" compare="sim_size" />
175 <expand macro="assert_conts" /> 166 <output name="out_table" value="out.table" />
176 </output>
177 <output name="out_table" value="test.table" />
178 </test> 167 </test>
179 </tests> 168 </tests>
180 <help><![CDATA[ 169 <help><![CDATA[
181 Cross-contamination Filter Plot 170 Cross-contamination Filter Plot
182 ################################### 171 ###################################
192 Example 181 Example
193 ~~~~~~~~ 182 ~~~~~~~~
194 183
195 Consider the following experimental setup, with a list of 100 possible barcodes, used over 3 sequencing plates, with each plate containing 4 unique batches, and each plate using a specific subset of the 100 barcodes. 184 Consider the following experimental setup, with a list of 100 possible barcodes, used over 3 sequencing plates, with each plate containing 4 unique batches, and each plate using a specific subset of the 100 barcodes.
196 185
197 :: 186 ::
198 187
199 Barcodes 188 Barcodes
200 189
201 1 - 10 | AAA AAC AAT AAG ACA AGA ATA CAC GAG TAT 190 1 - 10 | AAA AAC AAT AAG ACA AGA ATA CAC GAG TAT
202 11 - 20 | CCC CCA CCT CCG CTC CGC TCT GCG TCT CGT 191 11 - 20 | CCC CCA CCT CCG CTC CGC TCT GCG TCT CGT
203 . 192 .
204 . 193 .
205 91 -100 | TTT TAT TCT TGT TTA TTC TTG TCC TGG TAA 194 91 -100 | TTT TAT TCT TGT TTA TTC TTG TCC TGG TAA
207 196
208 197
209 Plate 1 +-------+-------+-------+-------+ 198 Plate 1 +-------+-------+-------+-------+
210 | B1 | B2 | B3 | B4 | 199 | B1 | B2 | B3 | B4 |
211 +-------+-------+-------+-------+ 200 +-------+-------+-------+-------+
212 1-50 51-100 51-100 1-50 201 1-50 51-100 51-100 1-50
213 202
214 Plate 2 +-------+-------+-------+-------+ 203 Plate 2 +-------+-------+-------+-------+
215 | B5 | B6 | B7 | B8 | 204 | B5 | B6 | B7 | B8 |
216 +-------+-------+-------+-------+ 205 +-------+-------+-------+-------+
217 1-40 41-80 1-40 41-80 206 1-40 41-80 1-40 41-80
218 207
219 Plate 3 +-------+-------+-------+-------+ 208 Plate 3 +-------+-------+-------+-------+
220 | B9 | B10 | B11 | B12 | 209 | B9 | B10 | B11 | B12 |
221 +-------+-------+-------+-------+ 210 +-------+-------+-------+-------+
222 1-40 41-80 1-40 41-80 211 1-40 41-80 1-40 41-80
223 212
224 213
225 **** 214 ****
226 215
227 The above plate and barcoding setup can be more textually represented by specifying barcode ranges and plate numbers, with each denoting which batch numbers they describe as outlined below: 216 The above plate and barcoding setup can be more textually represented by specifying barcode ranges and plate numbers, with each denoting which batch numbers they describe as outlined below:
242 ]]></help> 231 ]]></help>
243 <citations> 232 <citations>
244 <citation type="doi">10.1007/978-1-4939-7768-0_15</citation> 233 <citation type="doi">10.1007/978-1-4939-7768-0_15</citation>
245 </citations> 234 </citations>
246 </tool> 235 </tool>
247