diff bamtools-filter.xml @ 6:82658c080fd0 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/bamtools/bamtools_filter commit 36169ce65193faaace8e8b999f83adf0c3d5aeba
author iuc
date Tue, 05 Jun 2018 15:29:04 -0400
parents bd735cae4ce6
children 4fe8a75334c8
line wrap: on
line diff
--- a/bamtools-filter.xml	Thu May 25 11:49:34 2017 -0400
+++ b/bamtools-filter.xml	Tue Jun 05 15:29:04 2018 -0400
@@ -1,9 +1,10 @@
 <tool id="bamFilter" name="Filter" version="2.4.1">
     <description>BAM datasets on a variety of attributes</description>
-    <requirements>
-        <requirement type="package" version="2.4.0">bamtools</requirement>
-    </requirements>
-    <command>
+    <macros>
+          <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code">
         <![CDATA[
             cp '$script_file' '$out_file2' &&
             ln -s '${input_bam}' localbam.bam &&
@@ -26,7 +27,7 @@
         $(config[ 'filters' ].append( $filter ))
     #end for
     #if str( $rule_configuration.rules_selector ) == "true":
-        #set $config[ 'rule' ] = $rule_configuration.rules
+        #set $config[ 'rule' ] = str( $rule_configuration.rules )
     #end if
 #end if
 $json.dumps( $config, indent=4 )
@@ -70,7 +71,7 @@
                         <param name="bam_property_value" type="text" value="101M" label="Filter on this CIGAR string" help="Default (101M) is for 101 continuously matched bases"/>
                     </when>
                     <when value="insertSize">
-                        <param name="bam_property_value" type="text" value=">=250" label="Filter on insert size" help="You can use &gt;, &lt;, =, and ! (not) in your expression. E.g., to select pairs with insert size above 250 nt use &quot;>=250&quot;">
+                        <param name="bam_property_value" type="text" value="&gt;=250" label="Filter on insert size" help="You can use &gt;, &lt;, =, and ! (not) in your expression. E.g., to select pairs with insert size above 250 nt use &quot;&gt;=250&quot;">
                             <sanitizer invalid_char="">
                                 <valid initial="string.letters,string.digits"><add value="&gt;"/><add value="&lt;"/><add value="!="/><add value="-"/></valid>
                             </sanitizer>
@@ -110,7 +111,7 @@
                         <param name="bam_property_value" type="boolean" truevalue="true" falsevalue="false" label="Select second mate in a read pair" help="Checked = Read IS second mate, Empty = Read is NOT second mate"/>
                     </when>
                     <when value="mapQuality">
-                        <param name="bam_property_value" type="text" value="20" label="Filter on read mapping quality (phred scale)" help="You can use &gt;, &lt;, =, and ! (not) in your expression. E.g., to select reads with mapping quality of at least 30 use &quot;>=30&quot;">
+                        <param name="bam_property_value" type="text" value="20" label="Filter on read mapping quality (phred scale)" help="You can use &gt;, &lt;, =, and ! (not) in your expression. E.g., to select reads with mapping quality of at least 30 use &quot;&gt;=30&quot;">
                             <sanitizer invalid_char="">
                                 <valid initial="string.letters,string.digits"><add value="&gt;"/><add value="&lt;"/><add value="!="/></valid>
                             </sanitizer>
@@ -159,9 +160,9 @@
                         </param>
                     </when>
                     <when value="tag">
-                        <param name="bam_property_value" type="text" value="NM:&gt;1" label="Filter on a particular tag" help="You can use &gt;, &lt;, =, and ! (not).  Tag name and its value must be separated by &quot;:&quot;. E.g., to obtain reads with at least one mismatch use &quot;NM:&gt;1&quot;">
+                        <param name="bam_property_value" type="text" value="NM:&gt;1" label="Filter on a particular tag" help="You can use +, -, &gt;, &lt;, =, and ! (not).  Tag name and its value must be separated by &quot;:&quot;. E.g., to obtain reads with at least one mismatch use &quot;NM:&gt;1&quot;">
                             <sanitizer invalid_char="">
-                                <valid initial="string.letters,string.digits"><add value="&gt;"/><add value="&lt;"/><add value=":!="/></valid>
+                                <valid initial="string.letters,string.digits"><add value="&gt;"/><add value="&lt;"/><add value=":!=+-"/></valid>
                             </sanitizer>
                         </param>
                     </when>
@@ -188,11 +189,12 @@
         <test>
             <param name="input_bam" ftype="bam" value="bamtools-input1.bam"/>
             <param name="bam_property_selector" value="mapQuality"/>
-            <param name="bam_property_value" value=">20"/>
+            <param name="bam_property_value" value="&gt;20"/>
             <output name="out_file1" ftype="bam" file="bamtools-test1.bam" />
         </test>
     </tests>
     <help>
+<![CDATA[
 **What is does**
 
 BAMTools filter is a very powerful utility to perform complex filtering of BAM files. It is based on BAMtools suite of tools by Derek Barnett (https://github.com/pezmaster31/bamtools).
@@ -250,7 +252,7 @@
 For example, suppose get all reads that (**1**) do NOT map to mitochondria and either (**2**) have mapping quality over 20, or (**3**) are in properly mapped pairs. The logical rule to enable such
 filtering will look like this::
 
- !(1) &amp; (2 | 3)
+ !(1) & (2 | 3)
 
 Here, numbers 1, 2, and 3 represent conditions. The following screenshot illustrates how to do this in Galaxy:
 
@@ -290,8 +292,7 @@
 .. class:: infomark
 
 Additional information about BAMtools can be found at https://github.com/pezmaster31/bamtools/wiki
-
-
+]]>
     </help>
     <citations>
         <citation type="doi">10.1093/bioinformatics/btr174</citation>