view samtools_rmdup.xml @ 1:fe83e6f8e65e draft

Uploaded tool and dependency definitions that specify samtools version 0.1.19.
author devteam
date Thu, 27 Mar 2014 15:26:52 -0400
parents 7e92b2a53aab
children 3735f950b2f5
line wrap: on
line source

<tool id="samtools_rmdup" name="rmdup" version="1.0.1">
  <requirements>
    <requirement type="package" version="0.1.19">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>