diff 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
line wrap: on
line diff
--- a/crosscontamination_barcode_filter.xml	Thu Jan 24 09:52:58 2019 -0500
+++ b/crosscontamination_barcode_filter.xml	Mon Jun 03 14:55:24 2019 -0400
@@ -1,15 +1,7 @@
 <tool id="crosscontamination_barcode_filter" name="Cross-contamination Barcode Filter" version="@VERSION@">
     <description>for use in plate-based barcoded analyses</description>
     <macros>
-        <token name="@VERSION@">0.1</token>
-        <macro name="assert_conts" >
-            <assert_contents>
-                <has_text text="/CreationDate" />
-                <has_text text="/Producer" />
-                <has_line line="startxref" />
-                <has_line line="%%EOF" />
-            </assert_contents>
-        </macro>
+        <token name="@VERSION@">0.2</token>
         <macro name="sanitize_batch">
             <sanitizer invalid_char="">
                 <valid initial="string.digits">
@@ -35,10 +27,11 @@
                     <add value="&#41;"/> <!-- right parenthesis -->
                 </valid>
             </sanitizer>
-        </macro>        
+        </macro>
     </macros>
     <requirements>
-        <requirement type="package" version="2.2.1" >r-ggplot2</requirement>
+        <requirement type="package" version="3.1.1">r-ggplot2</requirement>
+        <requirement type="package" version="1.12.2">r-data.table </requirement>
     </requirements>
     <version_command><![CDATA[
         Rscript '$__tool_directory__/scripts/crosscontamination_filter.R' | head -1 | cut -d' ' -f 2
@@ -61,12 +54,12 @@
 spec = list(
     barcodes = '$input_barcodes',
     format = list(
-        "1-96"   = c(1,3,5,7),
-        "97-192" = c(2,4,6,8)
+        "1-96"   = c(1,3),
+        "97-192" = c(2,4)
     ),
     plates = list(
-        "1" = c(1,2,3,4),
-        "2" = c(5,6,7,8)
+        "1" = c(1,2),
+        "2" = c(3,4)
     )
 )
 #elif str($inbuilt_spec.select_use) == "custom":
@@ -74,7 +67,7 @@
     barcodes = '$input_barcodes',
     format = list(
     #for $i, $s in enumerate($inbuilt_spec.barcode_format)
-        "${s.range_start}-${s.range_end}" = c( ${s.batches} ) 
+        "${s.range_start}-${s.range_end}" = c( ${s.batches} )
         #if $i < len(list($inbuilt_spec.barcode_format)) - 1
         ,
         #end if
@@ -123,7 +116,7 @@
             </when>
         </conditional>
         <section name="advanced" expanded="false" title="RegEx Parameters" >
-            <param name="regex_extract" type="text" value=".*P(\\d)_(\\d)_([ACTG]+)" label="RegEx to extract Plate, Batch, and Barcodes from headers" >
+            <param name="regex_extract" type="text" value=".*P(\\d)_B(\\d)_([ACTG]+)" label="RegEx to extract Plate, Batch, and Barcodes from headers" >
                 <expand macro="sanitize_regex" />
             </param>
             <param name="regex_display" type="text" value="P\\1_B\\2_\\3" label="RegEx to replace Plate, Batch, and Barcodes from headers" >
@@ -137,44 +130,40 @@
     </outputs>
     <tests>
         <test><!-- Inbuilt MPI -->
-            <param name="input_table" value="out3.subtable" />
+            <param name="input_table" value="test.matrix" />
             <param name="input_barcodes" value="celseq_barcodes.192.raw" />
             <conditional name="inbuilt_spec" >
                 <param name="select_use" value="mpi_sagar" />
             </conditional>
-            <output name="out_plots" >
-                <expand macro="assert_conts" />
-            </output>
-            <output name="out_table" value="test.table" />
+            <output name="out_plots" value="out.pdf" compare="sim_size" />
+            <output name="out_table" value="out.table" />
         </test>
         <test><!-- Plate and Lane test -->
-            <param name="input_table" value="out3.subtable" />
+            <param name="input_table" value="test.matrix" />
             <param name="input_barcodes" value="celseq_barcodes.192.raw" />
             <conditional name="inbuilt_spec" >
                 <param name="select_use" value="custom" />
                 <repeat name="barcode_format" >
                     <param name="range_start" value="1"/>
                     <param name="range_end" value="96" />
-                    <param name="batches" value="1,3,5,7" />
+                    <param name="batches" value="1,3" />
                 </repeat>
                 <repeat name="barcode_format" >
                     <param name="range_start" value="97"/>
                     <param name="range_end" value="192" />
-                    <param name="batches" value="2,4,6,8" />
+                    <param name="batches" value="2,4" />
                 </repeat>
                 <repeat name="plate_format" >
                     <param name="plate" value="1" />
-                    <param name="batches" value="1,2,3,4" />
+                    <param name="batches" value="1,2" />
                 </repeat>
                 <repeat name="plate_format" >
                     <param name="plate" value="2" />
-                    <param name="batches" value="5,6,7,8" />
+                    <param name="batches" value="3,4" />
                 </repeat>
             </conditional>
-            <output name="out_plots" >
-                <expand macro="assert_conts" />
-            </output>
-            <output name="out_table" value="test.table" />
+            <output name="out_plots" value="out.pdf" compare="sim_size" />
+            <output name="out_table" value="out.table" />
         </test>
     </tests>
     <help><![CDATA[
@@ -194,10 +183,10 @@
 
 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.
 
-:: 
+::
 
  Barcodes
-    
+
   1 - 10 | AAA AAC AAT AAG ACA AGA ATA CAC GAG TAT
  11 - 20 | CCC CCA CCT CCG CTC CGC TCT GCG TCT CGT
     .
@@ -209,7 +198,7 @@
  Plate 1  +-------+-------+-------+-------+
           |  B1   |  B2   |  B3   |  B4   |
           +-------+-------+-------+-------+
-             1-50   51-100  51-100   1-50  
+             1-50   51-100  51-100   1-50
 
  Plate 2  +-------+-------+-------+-------+
           |  B5   |  B6   |  B7   |  B8   |
@@ -219,7 +208,7 @@
  Plate 3  +-------+-------+-------+-------+
           |  B9   |  B10  |  B11  |  B12  |
           +-------+-------+-------+-------+
-             1-40   41-80    1-40   41-80 
+             1-40   41-80    1-40   41-80
 
 
 ****
@@ -244,4 +233,3 @@
         <citation type="doi">10.1007/978-1-4939-7768-0_15</citation>
     </citations>
 </tool>
-