changeset 0:27136ac45e90 draft

Uploaded
author devteam
date Tue, 20 Aug 2013 12:35:53 -0400
parents
children 75e4b89f1004
files samtools_rmdup.xml test-data/1.bam tool_dependencies.xml
diffstat 3 files changed, 75 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/samtools_rmdup.xml	Tue Aug 20 12:35:53 2013 -0400
@@ -0,0 +1,69 @@
+<tool id="samtools_rmdup" name="rmdup" version="1.0.0">
+  <requirements>
+    <requirement type="package" version="0.1.18">samtools</requirement>
+  </requirements>
+  <description>remove PCR duplicates</description>
+  <command>samtools rmdup 
+  #if str( $bam_paired_end_type.bam_paired_end_type_selector ) == "PE"
+      ${bam_paired_end_type.force_se}
+  #else:
+      -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">
+        <option value="PE" selected="True">BAM is paired-end</option>
+        <option value="SE">BAM is single-end</option>
+      </param>
+      <when value="PE">
+        <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>
+    
+  </inputs>
+  <outputs>
+    <data name="output1" format="bam" />
+  </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="bam_paired_end_type_selector" value="PE" />
+      <param name="force_se" />
+      <output name="output1" file="1.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
+
+------
+
+**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.*
+
+  </help>
+</tool>
Binary file test-data/1.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Tue Aug 20 12:35:53 2013 -0400
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="samtools" version="0.1.18">
+        <repository changeset_revision="5f7ec5048224" name="package_samtools_0_1_18" owner="devteam" toolshed="http://testtoolshed.g2.bx.psu.edu" />
+    </package>
+</tool_dependency>