comparison samtools_coverage.xml @ 0:90f2dd176d80 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/sam_to_bam commit 4d0362c336f67d05086298ab4980c1d922d71c6e"
author iuc
date Tue, 28 Sep 2021 15:10:16 +0000
parents
children ae36fab06bc2
comparison
equal deleted inserted replaced
-1:000000000000 0:90f2dd176d80
1 <tool id="samtools_coverage" name="Samtools coverage" version="@TOOL_VERSION@" profile="@PROFILE@">
2 <description>computes 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 @PREPARE_IDX@
11 samtools coverage
12
13 #if $condition_input.input_pooling == "Yes":
14 ${ ' '.join( [ "'%s'" % $x for $x in $condition_input.input] ) }
15 #else
16 '$condition_input.input'
17 #end if
18
19 -l $additional_options.min_read_length
20 -q $additional_options.min_mq
21 -Q $additional_options.min_bq
22
23 #set $filter = $additional_options.required_flags
24 @FLAGS@
25 -rf $flags
26
27 #set $filter = $additional_options.skipped_flags
28 @FLAGS@
29 -ff $flags
30
31 #if $condition_histogram.histogram_select == "yes"
32 -m
33 -w $condition_histogram.n_bins
34 #if $condition_histogram.region != "":
35 -r '$condition_histogram.region'
36 #end if
37 #end if
38
39 -o '$output'
40 ]]></command>
41 <inputs>
42 <conditional name="condition_input">
43 <param name="input_pooling" type="select" label="Are you pooling bam files?" help="Calculate the coverage for multiple bam files" >
44 <option value="No" selected="True">No</option>
45 <option value="Yes">Yes</option>
46 </param>
47 <when value="No" >
48 <param name="input" type="data" format="bam" multiple="true" label="BAM file"/>
49 </when>
50 <when value="Yes">
51 <param name="input" type="data" format="bam" multiple="true" label="BAM files to be pooled"/>
52 </when>
53 </conditional>
54
55 <section name="additional_options" title="Additional Options" expanded="true">
56 <param name="min_read_length" argument="-l" type="integer" min="0" value="0" label="Minimum read length" help="Ignore reads shorter than INT base pairs (Default = 0)" />
57 <param name="min_mq" argument="-q" type="integer" min="0" value="0" label="Minimum mapping quality" help="Minimum mapping quality for an alignment to be used (Default = 0)" />
58 <param name="min_bq" argument="-Q" type="integer" min="0" value="0" label="Minimum base quality" help="Minimum base quality for a base to be considered (Default = 0)" />
59
60 <param name="required_flags" argument="--rf" type="select" multiple="True" label="Require that these flags are set">
61 <expand macro="flag_options" />
62 </param>
63
64 <param name="skipped_flags" argument="--ff" type="select" multiple="True" label="Exclude reads with any of the following flags set">
65 <expand macro="flag_options" s4="true" s256="true" s512="true" s1024="true"/>
66 </param>
67 </section>
68
69 <conditional name="condition_histogram">
70 <param name="histogram_select" argument="-m" type="select" label="Histogram" help="Show histogram instead of tabular output">
71 <option value="no" selected="true">No</option>
72 <option value="yes">Yes</option>
73 </param>
74 <when value="yes">
75 <param name="n_bins" argument="-w" type="integer" min="1" value="100" label="Number of bins in histogram" help="Number of bins in histogram" />
76 <param name="region" argument="-r" type="text" value="" label="Show specified region" help="Show specified region. Format: chr:start-end." />
77 </when>
78 <when value="no" />
79 </conditional>
80 </inputs>
81
82 <outputs>
83 <data name="output" format="tabular" from_work_dir="outfile" label="${tool.name} on ${on_string}" />
84 </outputs>
85
86 <tests>
87 <test>
88 <param name="input" value="test_1.bam" ftype="bam" />
89 <output name="output" file="results_1.tabular" ftype="tabular" />
90 </test>
91 <test>
92 <param name="input" value="test_1.bam" ftype="bam" />
93 <param name="histogram_select" value="yes" />
94 <param name="n_bins" value="50" />
95 <output name="output" file="results_2.txt" ftype="tabular" />
96 </test>
97 <test>
98 <param name="input_pooling" value="Yes" />
99 <param name="input" value="test_1.bam,test_2.bam" ftype="bam" />
100 <param name="histogram_select" value="yes" />
101 <param name="n_bins" value="100" />
102 <output name="output" file="results_3.txt" ftype="tabular" />
103 </test>
104 </tests>
105 <help><![CDATA[
106 **What it does**
107
108 This tool runs the ``samtools coverage`` command.
109
110 Computes the depth at each position or region and draws an ASCII-art histogram or tabulated text. If you select to pool the bam files, then it calculates coverage for the combined files.
111
112 The tabulated form uses the following headings:
113
114 - rname Reference name / chromosome
115 - startpos Start position
116 - endpos End position (or sequence length)
117 - numreads Number reads aligned to the region (after filtering)
118 - covbases Number of covered bases with depth >= 1
119 - coverage Proportion of covered bases [0..1]
120 - meandepth Mean depth of coverage
121 - meanbaseq Mean baseQ in covered region
122 - meanmapq Mean mapQ of selected reads
123
124 ]]></help>
125 <expand macro="citations"/>
126 </tool>