changeset 2:2098a49ddf66 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/bamtools/bamtools_filter commit a1517c9d22029095120643bbe2c8fa53754dd2b7
author devteam
date Wed, 11 Nov 2015 12:33:46 -0500
parents d64c7e752f4d
children 29ba2103739c
files bamtools-filter.xml tool_dependencies.xml
diffstat 2 files changed, 25 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/bamtools-filter.xml	Mon Mar 09 14:07:23 2015 -0400
+++ b/bamtools-filter.xml	Wed Nov 11 12:33:46 2015 -0500
@@ -1,32 +1,27 @@
-<tool id="bamFilter" name="Filter" version="0.0.1">
+<tool id="bamFilter" name="Filter" version="0.0.2">
   <description>BAM datasets on a variety of attributes</description>
   <requirements>
     <requirement type="package" version="2.3.0_2d7685d2ae">bamtools</requirement>
   </requirements>
   <command>
+    cat $script_file > $out_file2;
 
-    cat $script_file > $out_file2;
-    
     #for $bam_count, $input_bam in enumerate( $input_bams ):
-        ln -s "${input_bam.input_bam}" "localbam_${bam_count}.bam" &amp;&amp;
-        ln -s "${input_bam.input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" &amp;&amp;
+      ln -s "${input_bam}" "localbam_${bam_count}.bam" &amp;&amp;
+      ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" &amp;&amp;
     #end for
-    
+
     bamtools
     filter
     -script $script_file
-    
+
     #for $bam_count, $input_bam in enumerate( $input_bams ):
         -in "localbam_${bam_count}.bam"
     #end for
     -out $out_file1
-    
   </command>
-
   <inputs>
-    <repeat name="input_bams" title="BAM dataset(s) to filter" min="1">
-          <param name="input_bam" type="data" format="bam" label="BAM dataset" />
-    </repeat>
+    <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" min="1" multiple="True"/>
     <repeat name="conditions" title="Condition" min="1">
       <repeat name="filters" title="Filter" min="1">
         <conditional name="bam_property">
@@ -59,10 +54,10 @@
             <param name="bam_property_value" type="integer" value="3" label="Filter on this alignment flag" help="Default (3) is for a paired read mapped in a proper pair"/>
           </when>
           <when value="cigar">
-            <param name="bam_property_value" type="text" size="10" value="101M" label="Filter on this CIGAR string" help="Default (101M) is for 101 continuously matched bases"/>
+            <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" size="10" value=">=250" label="Filter on inster size" help="You can use &gt;, &lt;, =, and ! (not) in your expression. E.g., to select pairs with inster size above 250 nt use &quot;>=250&quot;">
+            <param name="bam_property_value" type="text" value=">=250" label="Filter on inster size" help="You can use &gt;, &lt;, =, and ! (not) in your expression. E.g., to select pairs with inster size above 250 nt use &quot;>=250&quot;">
               <sanitizer invalid_char="">
                 <valid initial="string.letters,string.digits"><add value="&gt;"/><add value="&lt;"/><add value="!="/></valid>
               </sanitizer>
@@ -164,7 +159,7 @@
     <conditional name="rule_configuration">
       <param name="rules_selector" type="boolean" truevalue="true" falsevalue="false" label="Would you like to set rules?" help="Allows complex logical constructs. See Example 4 below." />
       <when value="true">
-        <param name="rules" type="text" size="20" label="Enter rules here" help="This option can only be used with at least two conditions. Read help below (Example 4) to understand how it works." >
+        <param name="rules" type="text" label="Enter rules here" help="This option can only be used with at least two conditions. Read help below (Example 4) to understand how it works." >
           <sanitizer invalid_char="">
             <valid initial="string.printable"/>
           </sanitizer>
@@ -185,20 +180,20 @@
       #for $i, $c in enumerate( $conditions, start=1 )
           { "id": "$i",
           #for $j, $s in enumerate( $c.filters, start=1 )
-          ##The if below takes care of the comma at the end of last condition within group       
+          ##The if below takes care of the comma at the end of last condition within group
             #if $j != len( $c.filters)
             "${s.bam_property.bam_property_selector}":"${s.bam_property.bam_property_value}",
             #else
             "${s.bam_property.bam_property_selector}":"${s.bam_property.bam_property_value}"
             #end if
           #end for
-          ##The if below takes care of the comma at the end of last condition within group 
+          ##The if below takes care of the comma at the end of last condition within group
           #if $i != len( $conditions )
           },
           #else
           }
-          #end if      
-      #end for   
+          #end if
+      #end for
       #if len( $conditions ) > 1
       #if str( $rule_configuration.rules_selector ) == "True":
         ],
@@ -217,10 +212,10 @@
   </outputs>
     <tests>
         <test>
-            <param name="input_bam" ftype="bam" value="bamtools-input1.bam"/>
+            <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/>
             <param name="bam_property_selector" value="mapQuality"/>
             <param name="bam_property_value" value=">20"/>
-            <output name="out_file1" file="bamtools-test1.bam" ftype="bam"/>        
+            <output name="out_file1" file="bamtools-test1.bam" ftype="bam"/>
         </test>
     </tests>
 <help>
@@ -249,7 +244,7 @@
 When filtering on a single condition there is no need to worry about filters and conditions. Just choose a filter from the **Select BAM property to filter on:** dropdown and enter a value (or click a checkbox for binary filters).
 For example, for retaining reads with mapping quality of at least 20 one would set the tool interface as shown below:
 
-.. image:: ${static_path}/images/single-filter.png
+.. image:: single-filter.png
 
 -----
 
@@ -258,7 +253,7 @@
 Now suppose one needs to extract reads that (1) have mapping quality of at least 20, (2) contain at least 1 mismatch, and (3) are mapping onto forward strand only.
 To do so we will use three filters as shown below (multiple filters are added to the interface by clicking on the **Add new Filter** button):
 
-.. image:: ${static_path}/images/multiple-filters.png
+.. image:: multiple-filters.png
 
 In this case (you can see that the three filters are grouped within a single Condition - **Condition 1**) the filter too use logical **AND** to perform filtering.
 In other words only reads that (1) have mapping quality of at least 20 **AND** (2) contain at least 1 mismatch **AND** are mapping onto forward strand will be returned in this example.
@@ -267,11 +262,11 @@
 
 **Example 3. Complex filtering with multiple conditions**
 
-Suppose now you would like to select **either** reads that (**1**) have (*1.1*) no mismatches and (*1.2*) are on the forward strand **OR** (**2**) reads that have (*2.1*) 
-at least one mismatch and (*2.2*) are on the reverse strand. In this scenario we have to set up two conditions: (**1**) and (**2**) each with two filters: *1.1* and *1.2* as well as *2.1* and *2.2*. 
+Suppose now you would like to select **either** reads that (**1**) have (*1.1*) no mismatches and (*1.2*) are on the forward strand **OR** (**2**) reads that have (*2.1*)
+at least one mismatch and (*2.2*) are on the reverse strand. In this scenario we have to set up two conditions: (**1**) and (**2**) each with two filters: *1.1* and *1.2* as well as *2.1* and *2.2*.
 The following screenshot expalins how this can be done:
 
-.. image:: ${static_path}/images/complex-filters.png
+.. image:: complex-filters.png
 
 -----
 
@@ -282,10 +277,10 @@
 filtering will look like this::
 
  !(1) &amp; (2 | 3)
- 
+
 Here, numbers 1, 2, and 3 represent conditions. The following screenshot illustrates how to do this in Galaxy:
 
-.. image:: ${static_path}/images/rule.png
+.. image:: rule.png
 
 There are three conditions here, each with a single filter. A text entry area that can be opened by clicking on the **Would you like to set rules?** checkbox enables you to enter a rule.
 Here numbers correspond to numbers of conditions as they are shown in the interface. E.g., 1 corresponds to condition 1, 2 to condition 2 and so on... In human language this means::
@@ -312,8 +307,7 @@
           }
         ]
       }
-    
-    
+
 
 -----
 
--- a/tool_dependencies.xml	Mon Mar 09 14:07:23 2015 -0400
+++ b/tool_dependencies.xml	Wed Nov 11 12:33:46 2015 -0500
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
     <package name="bamtools" version="2.3.0_2d7685d2ae">
-        <repository changeset_revision="4e49af060657" name="package_bamtools_2_3_0_2d7685d2ae" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="7d6da4982f19" name="package_bamtools_2_3_0_2d7685d2ae" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>