comparison samtools_depth.xml @ 0:090651229eba draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_depth commit b75040a9832972a60a964bc5a35da029d2bcf86c
author iuc
date Sun, 14 Oct 2018 19:14:57 -0400
parents
children 44de678a44c4
comparison
equal deleted inserted replaced
-1:000000000000 0:090651229eba
1 <tool id="samtools_depth" name="Samtools depth" version="1.8">
2 <description>compute the depth at each position or region</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="stdio"/>
8 <expand macro="version_command"/>
9 <command><![CDATA[
10 ## create symlinks to bams and index files (0,..., n-1 + 0.[bai|crai],...,n-1.[bai|crai] )
11 @PREPARE_IDX_MULTIPLE@
12
13 samtools depth
14 $all
15 #if $cond_region.select_region == 'bed':
16 -b '$cond_region.input_bed'
17 #else if $cond_region.select_region == 'text':
18 -r $cond_region.region
19 #end if
20 #if str($minlength) != '':
21 -l $minlength
22 #end if
23 #if str($maxdepth) != '':
24 -m $maxdepth
25 #end if
26 #if str($basequality) != '':
27 -q $basequality
28 #end if
29 #if str($mapquality) != '':
30 -Q $mapquality
31 #end if
32 #for $i in range(len( $input_bams )):
33 ${i}
34 #end for
35 > '${output}'
36 ]]></command>
37 <inputs>
38 <param name="input_bams" type="data" format="bam" multiple="true" label="BAM file(s)" />
39 <conditional name="cond_region">
40 <param name="select_region" type="select" label="Filter by regions">
41 <option value="no" selected="True">No</option>
42 <option value="text">Manualy specify a region</option>
43 <option value="bed">Regions from BED file</option>
44 </param>
45 <when value="no"/>
46 <when value="text">
47 <param name="region" type="text" optional="false" argument="-r" label="Only report depth in a specified region" help="Format is CHROMOSOME:FROM-TO"/>
48 </when>
49 <when value="bed">
50 <param name="input_bed" type="data" format="bed" argument="-b" label="Genomic intervals (in BED format)" help="Compute depth at list of positions or regions in specified BED FILE." />
51 </when>
52 </conditional>
53
54 <param name="all" type="select" argument="-a/-aa" label="Output all positions" help="Note that if the all option (-a) is used in conjunction with a BED file it may sometimes operate as if -aa was specified if the reference sequence has coverage outside of the region specified in the BED file.">
55 <option value="" selected="True">Default</option>
56 <option value="-a">Output all positions (including those with zero depth) (-a)</option>
57 <option value="-aa">Output absolutely all positions, including unused reference sequences. (-aa)</option>
58 </param>
59 <param name="minlength" type="integer" argument="-l" min="0" optional="true" label="Ignore reads shorter than" />
60 <param name="maxdepth" type="integer" argument="-m" min="0" optional="true" label="Limits the maximum number of considered alignments starting at any sequence position to INT. Note that, the reported depths values might be larger than INT. If 0, depth is set to the maximum integer value, effectively removing any depth limit. (default = 8000)" />
61
62 <param name="basequality" type="integer" argument="-q" min="0" optional="true" label="Only count reads with base quality greater than" />
63 <param name="mapquality" type="integer" argument="-Q" min="0" optional="true" label="Only count reads with mapping quality greater than" />
64 </inputs>
65 <outputs>
66 <data name="output" format="tabular" label="${tool.name} on ${on_string}" />
67 </outputs>
68 <tests>
69 <test>
70 <conditional name="cond_region">
71 <param name="select_region" value="bed"/>
72 <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
73 </conditional>
74 <param name="input_bams" value="eboVir3.bam" ftype="bam" />
75 <output name="output" file="samtools_depth_out1.tab" />
76 </test>
77 <test>
78 <conditional name="cond_region">
79 <param name="select_region" value="text"/>
80 <param name="region" value="eboVir3:500-1500" />
81 </conditional>
82 <param name="input_bams" value="eboVir3.bam" ftype="bam" />
83 <output name="output" file="samtools_depth_out2.tab" />
84 </test>
85 <test>
86 <param name="input_bams" value="eboVir3.bam,eboVir3.2.bam" ftype="bam" />
87 <param name="all" value="-a"/>
88 <output name="output" file="samtools_depth_out3.tab" />
89 </test>
90 <test>
91 <param name="input_bams" value="eboVir3.bam,eboVir3.2.bam" ftype="bam" />
92 <param name="minlength" value="10" />
93 <!-- Odd thing: I did not expect values > 4 in the output, but there are ... ?
94 see https://github.com/samtools/samtools/issues/889 -->
95 <param name="maxdepth" value="4" />
96 <param name="basequality" value="11" />
97 <param name="mapquality" value="12" />
98 <output name="output" file="samtools_depth_out4.tab" />
99 </test>
100 </tests>
101 <help>
102 **What it does**
103
104 Computes the depth at each position or region using the ``samtools depth`` command.
105
106 The output is a tabular file, with one line for each base of each reference
107 with any coverage (bases with no coverage may not appear).
108
109 The first column is the reference name, the second column is the reference
110 position, and then there is one column for each SAM/BAM file giving the
111 coverage depth at that position.
112 </help>
113 <expand macro="citations"/>
114 </tool>