changeset 2:b1b367792034 draft

planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
author devteam
date Tue, 13 Oct 2015 12:55:32 -0400
parents 75e4b89f1004
children d67b176f2dae
files macros.xml samtools_rmdup.xml test-data/1.bam test-data/samtools-rmdup-input1.bam test-data/samtools-rmdup-test1.bam tool_dependencies.xml
diffstat 6 files changed, 88 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Oct 13 12:55:32 2015 -0400
@@ -0,0 +1,70 @@
+<macros>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="1.2">samtools</requirement>
+            <yield/>
+        </requirements>
+    </xml>
+    <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},}
+            </citation>
+            <citation type="doi">10.1093/bioinformatics/btp352</citation>
+            <citation type="doi">10.1093/bioinformatics/btr076</citation>
+            <citation type="doi">10.1093/bioinformatics/btr509</citation>
+            <citation type="bibtex">
+                @misc{Danecek_et_al,
+                Author={Danecek, P., Schiffels, S., Durbin, R.},
+                title={Multiallelic calling model in bcftools (-m)},
+                url = {http://samtools.github.io/bcftools/call-m.pdf},}
+            </citation>
+            <citation type="bibtex">
+                @misc{Durbin_VCQC,
+                Author={Durbin, R.},
+                title={Segregation based metric for variant call QC},
+                url = {http://samtools.github.io/bcftools/rd-SegBias.pdf},}
+            </citation>
+            <citation type="bibtex">
+                @misc{Li_SamMath,
+                Author={Li, H.},
+                title={Mathematical Notes on SAMtools Algorithms},
+                url = {http://www.broadinstitute.org/gatk/media/docs/Samtools.pdf},}
+            </citation>
+            <citation type="bibtex">
+                @misc{SamTools_github,
+                title={SAMTools GitHub page},
+                url = {https://github.com/samtools/samtools},}
+            </citation>
+        </citations>
+    </xml>
+    <xml name="version_command">
+        <version_command>samtools --version | head -n 1 | awk '{ print $2 }'</version_command>
+    </xml>
+    <xml name="stdio">
+        <stdio>
+            <exit_code range="1:" level="fatal" description="Error" />
+        </stdio>
+    </xml>
+    <token name="@no-chrom-options@">
+-----
+
+.. class:: warningmark
+
+**No options available? How to re-detect metadata**
+
+If you see a &quot;No options available&quot; within the &quot;**Select references (chromosomes and contigs) you would like to restrict bam to**&quot; drop down, you need to re-detect metadata for the dataset you are trying to process. To do this follow these steps:
+
+1. Click on the **pencil** icon adjacent to the dataset in the history
+2. A new menu will appear in the center pane of the interface
+3. Click **Datatype** tab
+4. Set **New Type** to **BAM**
+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_rmdup.xml	Thu Mar 27 14:05:46 2014 -0400
+++ b/samtools_rmdup.xml	Tue Oct 13 12:55:32 2015 -0400
@@ -1,8 +1,11 @@
-<tool id="samtools_rmdup" name="rmdup" version="1.0.1">
-  <requirements>
-    <requirement type="package" version="0.1.19">samtools</requirement>
-  </requirements>
+<tool id="samtools_rmdup" name="RmDup" version="2.0">
   <description>remove PCR duplicates</description>
+  <macros>
+    <import>macros.xml</import>
+  </macros>
+  <expand macro="requirements"></expand>
+  <expand macro="stdio"></expand>
+  <expand macro="version_command"></expand>
   <command>samtools rmdup 
   #if str( $bam_paired_end_type.bam_paired_end_type_selector ) == "PE"
       ${bam_paired_end_type.force_se}
@@ -10,18 +13,17 @@
       -s
   #end if
   "$input1" "$output1"
-  2&gt;&amp;1 || echo "Error running samtools rmdup." &gt;&amp;2
   </command>
   <inputs>
     <param name="input1" type="data" format="bam" label="BAM File" />
     
     <conditional name="bam_paired_end_type">
-      <param name="bam_paired_end_type_selector" type="select" label="Is data paired-end">
+      <param name="bam_paired_end_type_selector" type="select" label="Is this paired-end or single end data">
         <option value="PE" selected="True">BAM is paired-end</option>
-        <option value="SE">BAM is single-end</option>
+        <option value="SE">BAM is single-end (-s)</option>
       </param>
       <when value="PE">
-        <param name="force_se" type="boolean" label="Treat as single-end" help="(-S)" truevalue="-S" falsevalue="" checked="False"/>
+        <param name="force_se" type="boolean" label="Treat as single-end" help="-S" truevalue="-S" falsevalue="" checked="False"/>
       </when>
       <when value="SE" /> <!-- No extra parameters here -->
     </conditional>
@@ -32,38 +34,21 @@
   </outputs>
   <tests>
     <test>
-      <param name="input1" value="1.bam" ftype="bam" />
-      <param name="bam_paired_end_type_selector" value="SE" />
-      <output name="output1" file="1.bam" ftype="bam" sort="True"/>
-    </test>
-    <test>
-      <param name="input1" value="1.bam" ftype="bam" />
-      <param name="bam_paired_end_type_selector" value="PE" />
-      <param name="force_se" value="True" />
-      <output name="output1" file="1.bam" ftype="bam" sort="True"/>
-    </test>
-    <test>
-      <param name="input1" value="1.bam" ftype="bam" />
+      <param name="input1" value="samtools-rmdup-input1.bam" ftype="bam" />
       <param name="bam_paired_end_type_selector" value="PE" />
       <param name="force_se" />
-      <output name="output1" file="1.bam" ftype="bam" sort="True" />
+      <output name="output1" file="samtools-rmdup-test1.bam" ftype="bam" sort="True" />
     </test>
   </tests>
   <help>
 
 **What it does**
 
-This tool uses the SAMTools_ toolkit to remove potential PCR duplicates: if multiple read pairs have identical external coordinates, only retain the pair with highest mapping quality. In the paired-end mode, this command ONLY works with FR orientation and requires ISIZE is correctly set. It does not work for unpaired reads (e.g. two ends mapped to different chromosomes or orphan reads). 
-
-.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
-
-------
+Remove potential PCR duplicates: if multiple read pairs have identical external coordinates, only retain the pair with highest mapping quality. In the paired-end mode, this command ONLY works with FR orientation and requires ISIZE is correctly set. It does not work for unpaired reads (e.g. two ends mapped to different chromosomes or orphan reads). This tool has the following parameters::
 
-**Citation**
-
-For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. &lt;http://www.ncbi.nlm.nih.gov/pubmed/19505943&gt;`_
-
-If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
+  -s    rmdup for SE reads
+  -S    treat PE reads as SE in rmdup (force -s)
 
   </help>
+    <expand macro="citations"></expand>
 </tool>
Binary file test-data/1.bam has changed
Binary file test-data/samtools-rmdup-input1.bam has changed
Binary file test-data/samtools-rmdup-test1.bam has changed
--- a/tool_dependencies.xml	Thu Mar 27 14:05:46 2014 -0400
+++ b/tool_dependencies.xml	Tue Oct 13 12:55:32 2015 -0400
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="samtools" version="0.1.19">
-        <repository changeset_revision="233326db3402" name="package_samtools_0_1_19" owner="devteam" toolshed="http://testtoolshed.g2.bx.psu.edu" />
+    <package name="samtools" version="1.2">
+        <repository changeset_revision="192f00129358" name="package_samtools_1_2" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>