changeset 12:ce5482dfe8bd draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/bamtools/bamtools_filter commit 08b8fbdbce3ec7ccc8eb93d8c6b7a5234459cca9
author iuc
date Sat, 02 Sep 2017 11:43:07 -0400
parents 6fae66d050a7
children 9d8b309a7265
files bamtools-filter.xml macros.xml
diffstat 2 files changed, 28 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/bamtools-filter.xml	Thu May 25 11:49:21 2017 -0400
+++ b/bamtools-filter.xml	Sat Sep 02 11:43:07 2017 -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 &&
@@ -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>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Sat Sep 02 11:43:07 2017 -0400
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<macros>
+    <token name="@VERSION@">2.4.0</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@VERSION@">bamtools</requirement>
+            <requirement type="package" version="1.4.1">samtools</requirement>
+        </requirements>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1093/bioinformatics/btr174</citation>
+        </citations>
+    </xml>
+</macros>
\ No newline at end of file