PageRenderTime 26ms CodeModel.GetById 17ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/samtools/samtools_rmdup.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 61 lines | 55 code | 6 blank | 0 comment | 0 complexity | 379076a58c7201aaeacd1dea350eb9c1 MD5 | raw file
 1<tool id="samtools_rmdup" name="rmdup" version="1.0.0">
 2  <requirements>
 3    <requirement type="package">samtools</requirement>
 4  </requirements>
 5  <description>remove PCR duplicates</description>
 6  <command>samtools rmdup 
 7  #if str( $bam_paired_end_type.bam_paired_end_type_selector ) == "PE"
 8      ${bam_paired_end_type.force_se}
 9  #else:
10      -s
11  #end if
12  "$input1" "$output1"
13  2&gt;&amp;1 || echo "Error running samtools rmdup." &gt;&amp;2
14  </command>
15  <inputs>
16    <param name="input1" type="data" format="bam" label="BAM File" />
17    
18    <conditional name="bam_paired_end_type">
19      <param name="bam_paired_end_type_selector" type="select" label="Is data paired-end">
20        <option value="PE" selected="True">BAM is paired-end</option>
21        <option value="SE">BAM is single-end</option>
22      </param>
23      <when value="PE">
24        <param name="force_se" type="boolean" label="Treat as single-end" help="(-S)" truevalue="-S" falsevalue="" checked="False"/>
25      </when>
26      <when value="SE" /> <!-- No extra parameters here -->
27    </conditional>
28    
29  </inputs>
30  <outputs>
31    <data name="output1" format="bam" />
32  </outputs>
33  <tests>
34    <test>
35      <param name="input1" value="1.bam" ftype="bam" />
36      <param name="bam_paired_end_type_selector" value="SE" />
37      <output name="output1" file="1.bam" ftype="bam" sort="True"/>
38    </test>
39    <test>
40      <param name="input1" value="1.bam" ftype="bam" />
41      <param name="bam_paired_end_type_selector" value="PE" />
42      <param name="force_se" value="True" />
43      <output name="output1" file="1.bam" ftype="bam" sort="True"/>
44    </test>
45    <test>
46      <param name="input1" value="1.bam" ftype="bam" />
47      <param name="bam_paired_end_type_selector" value="PE" />
48      <param name="force_se" />
49      <output name="output1" file="1.bam" ftype="bam" sort="True" />
50    </test>
51  </tests>
52  <help>
53
54**What it does**
55
56This 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). 
57
58.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
59
60  </help>
61</tool>