changeset 3:e371922c38e8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_bedcov commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
author iuc
date Tue, 09 May 2017 11:15:55 -0400
parents 21964f813454
children b7ab754899d5
files macros.xml samtools_bedcov.xml tool_dependencies.xml
diffstat 3 files changed, 28 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Fri Dec 18 19:43:23 2015 -0500
+++ b/macros.xml	Tue May 09 11:15:55 2017 -0400
@@ -1,16 +1,17 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="1.2">samtools</requirement>
+            <requirement type="package" version="1.3.1">samtools</requirement>
             <yield/>
         </requirements>
     </xml>
+    <token name="@TOOL_VERSION@">1.3.1</token>
     <xml name="citations">
         <citations>
             <citation type="bibtex">
                 @misc{SAM_def,
                 title={Definition of SAM/BAM format},
-                url = {https://samtools.github.io/hts-specs/SAMv1.pdf},}
+                url = {https://samtools.github.io/hts-specs/},}
             </citation>
             <citation type="doi">10.1093/bioinformatics/btp352</citation>
             <citation type="doi">10.1093/bioinformatics/btr076</citation>
@@ -41,7 +42,7 @@
         </citations>
     </xml>
     <xml name="version_command">
-        <version_command>echo $(samtools --version | head -n 1)", "$(samtools --version | grep -o -E "htslib.*?")</version_command>
+        <version_command><![CDATA[samtools 2>&1 | grep Version]]></version_command>
     </xml>
     <xml name="stdio">
         <stdio>
@@ -64,7 +65,5 @@
 5. Click **Save**
 
 The medatada will be re-detected and you will be able to see the list of reference sequences in the &quot;**Select references (chromosomes and contigs) you would like to restrict bam to**&quot; drop-down.
-
     </token>
-
 </macros>
--- a/samtools_bedcov.xml	Fri Dec 18 19:43:23 2015 -0500
+++ b/samtools_bedcov.xml	Tue May 09 11:15:55 2017 -0400
@@ -1,36 +1,31 @@
-<tool id="samtools_bedcov" name="BedCov" version="2.0">
-  <description>calculate read depth for a set of genomic intervals</description>
-  <macros>
-    <import>macros.xml</import>
-  </macros>
-  <expand macro="requirements"></expand>
-    <expand macro="stdio"></expand>
-    <expand macro="version_command"></expand>
+<tool id="samtools_bedcov" name="BedCov" version="2.0.1">
+    <description>calculate read depth for a set of genomic intervals</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="stdio"/>
+    <expand macro="version_command"/>
     <command><![CDATA[
-        for bamfile in 
-        #for dataset in $input_bams:
-            "${dataset}"
+        ## Ensure simlinks have unique filenames
+        #for $i, $bam in enumerate( $input_bams ):
+            ln -s -f '${bam}' '${i}.bam' &&
+            ln -s -f '${bam.metadata.bam_index}' '${i}.bam.bai' &&
         #end for
-        ; do
-            if [ ! -f \$bamfile.bai ] ; then
-                ln -s \$bamfile && samtools index `basename \$bamfile` ;
-            else
-                ln -s \$bamfile && ln -s \$bamfile.bai ;
-            fi ;
-        done ;
-        samtools bedcov "${input_bed}"
-        #for dataset in $input_bams:
-            `basename "${dataset}"`
-        #end for
-        > "${output}"
-        ]]>
-    </command>
+
+        samtools bedcov
+            '${input_bed}'
+            #for $i in range(len( $input_bams )):
+                '${i}.bam'
+            #end for
+            > '${output}'
+    ]]></command>
     <inputs>
-        <param name="input_bed" type="data" format="bed" label="BED file" />
-        <param name="input_bams" type="data" format="bam" label="BAM file" multiple="true" />
+        <param name="input_bed" type="data" format="bed" label="Genemic intervals (in BED format)" />
+        <param name="input_bams" type="data" format="bam" multiple="true" label="BAM file(s)" />
     </inputs>
     <outputs>
-        <data format="tabular" name="output" label="${tool.name} on ${on_string}" />
+        <data name="output" format="tabular" label="${tool.name} on ${on_string}" />
     </outputs>
     <tests>
         <test>
@@ -50,8 +45,6 @@
 Calculates read depth for regions listed in a BED dataset using ``samtools bedcov`` command::
 
  samtools bedcov [INPUT BED] [INPUT BAM1] ... [INPUT BAMn] > [OUTPUT]
-
     </help>
-    <expand macro="citations"></expand>
+    <expand macro="citations"/>
 </tool>
-
--- a/tool_dependencies.xml	Fri Dec 18 19:43:23 2015 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="samtools" version="1.2">
-        <repository changeset_revision="a55970300738" name="package_samtools_1_2" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>