annotate bedtools_genomecov/genomeCoverageBed.xml @ 5:f7beecae0315 draft

Uploaded
author jackcurragh
date Fri, 27 May 2022 11:51:43 +0000
parents a48ca51cb2de
children 9baff1cd6af2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
1 <tool id="bedtools_genomecoveragebed" name="BedTools Genome Coverage" version="@TOOL_VERSION@" profile="@PROFILE@">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
2 <description>Compute Read Coverage Over An Entire Genome</description>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
3 <macros>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
4 <import>macros.xml</import>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
5 </macros>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
6 <expand macro="bio_tools" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
7 <expand macro="requirements" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
8 <expand macro="stdio" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
9 <command><![CDATA[
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
10 bedtools genomecov
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
11 @GENOME_FILE_COVERAGE@
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
12
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
13 $split
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
14 $strand
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
15
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
16 #if str($report.report_select) == "bg":
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
17 #if $report.zero_regions:
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
18 $report.zero_regions
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
19 #else:
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
20 -bg
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
21 #end if
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
22
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
23 #if str($report.scale):
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
24 -scale $report.scale
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
25 #end if
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
26 #else:
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
27 #if str($report.max):
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
28 -max $report.max
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
29 #end if
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
30 #end if
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
31 $d
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
32 $dz
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
33 $five
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
34 $three
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
35 > '$output'
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
36 ]]></command>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
37 <inputs>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
38 <conditional name="input_type">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
39 <param name="input_type_select" type="select" label="Input type">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
40 <option value="bed">@STD_BEDTOOLS_INPUT_LABEL@</option>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
41 <option value="bam" selected='true'>BAM</option>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
42 </param>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
43 <when value="bed">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
44 <param name="input" argument="-i" type="data" format="@STD_BEDTOOLS_INPUTS@" label="@STD_BEDTOOLS_INPUT_LABEL@ file" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
45 <expand macro="input_conditional_genome_file" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
46 </when>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
47 <when value="bam">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
48 <param name="input" argument="-ibam" type="data" format="bam" label="BAM file" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
49 </when>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
50 </conditional>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
51 <conditional name="report">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
52 <param name="report_select" type="select" label="Output type">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
53 <option value="bg" selected="true">BedGraph coverage file</option>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
54 <option value="hist">Data suiteable for Histogram</option>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
55 </param>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
56 <when value="bg">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
57 <param name="zero_regions" argument="-bga" type="boolean" truevalue="-bga" falsevalue="" checked="false"
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
58 label="Report regions with zero coverage" help="If set, regions without any coverage will also be reported" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
59 <param argument="-scale" type="float" value="1.0"
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
60 label="Scale the coverage by a constant factor"
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
61 help="Each bedGraph coverage value is multiplied by this factor before being reported. Useful for normalizing coverage by, e.g., reads per million (RPM)." />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
62 </when>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
63 <when value="hist">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
64 <param argument="-max" type="integer" value="0" label="Specify max depth"
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
65 help="Combine all positions with a depth >= max into a single bin in the histogram" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
66 </when>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
67 </conditional>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
68 <expand macro="split" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
69 <param argument="-strand" type="select" label="Calculate coverage based on">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
70 <option value="">both strands combined</option>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
71 <option value="-strand +">positive strand only</option>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
72 <option value="-strand -">negative strand only</option>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
73 </param>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
74
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
75 <param argument="-d" type="boolean" truevalue="-d" falsevalue="" checked="false"
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
76 label="Report the depth at each genome position with 1-based coordinates" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
77 <param argument="-dz" type="boolean" truevalue="-dz" falsevalue="" checked="false"
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
78 label="Report the depth at each genome position with 0-based coordinatess" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
79 <param name="five" argument="-5" type="boolean" truevalue="-5" falsevalue="" checked="false"
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
80 label="Calculate coverage of 5’ positions" help="Instead of entire interval" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
81 <param name="three" argument="-3" type="boolean" truevalue="-3" falsevalue="" checked="false"
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
82 label="Calculate coverage of 3’ positions" help="Instead of entire interval" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
83 </inputs>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
84 <outputs>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
85 <data name="output" format="bedgraph">
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
86 <change_format>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
87 <when input="report.report_select" value="hist" format="tabular" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
88 </change_format>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
89 </data>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
90 </outputs>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
91 <tests>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
92 <test>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
93 <param name="input_type_select" value="bed" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
94 <param name="input" value="genomeCoverageBed1.bed" ftype="bed" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
95 <param name="genome_file_opts_selector" value="hist" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
96 <param name="genome" value="genomeCoverageBed1.len" ftype="tabular" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
97 <param name="report_select" value="hist" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
98 <output name="output" file="genomeCoverageBed_result1.bed" ftype="tabular" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
99 </test>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
100 </tests>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
101 <help><![CDATA[
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
102 **What it does**
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
103
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
104 This tool calculates the genome-wide coverage of intervals defined in a BAM or BED file and reports them in BedGraph format.
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
105
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
106 .. image:: $PATH_TO_IMAGES/genomecov-glyph.png
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
107
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
108 .. class:: warningmark
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
109
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
110 The input BED or BAM file must be sorted by chromosome name (but doesn't necessarily have to be sorted by start position).
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
111
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
112 -----
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
113
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
114 **Example 1**
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
115
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
116 Input (BED format)-
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
117 Overlapping, un-sorted intervals::
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
118
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
119 chr1 140 176
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
120 chr1 100 130
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
121 chr1 120 147
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
122
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
123
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
124 Output (BedGraph format)-
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
125 Sorted, non-overlapping intervals, with coverage value on the 4th column::
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
126
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
127 chr1 100 120 1
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
128 chr1 120 130 2
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
129 chr1 130 140 1
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
130 chr1 140 147 2
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
131 chr1 147 176 1
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
132
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
133 -----
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
134
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
135 **Example 2 - with ZERO-Regions selected (assuming hg19)**
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
136
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
137 Input (BED format)-
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
138 Overlapping, un-sorted intervals::
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
139
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
140 chr1 140 176
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
141 chr1 100 130
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
142 chr1 120 147
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
143
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
144
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
145 BedGraph output will contain five columns:
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
146
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
147 * 1. Chromosome name (or 'genome' for whole-genome coverage)
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
148 * 2. Coverage depth
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
149 * 3. The number of bases on chromosome (or genome) with depth equal to column 2.
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
150 * 4. The size of chromosome (or entire genome) in base pairs
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
151 * 5. The fraction of bases on chromosome (or entire genome) with depth equal to column 2.
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
152
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
153 **Example Output**:
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
154
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
155 chr2L 0 1379895 23011544 0.0599653
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
156 chr2L 1 837250 23011544 0.0363839
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
157 chr2L 2 904442 23011544 0.0393038
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
158 chr2L 3 913723 23011544 0.0397072
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
159 chr2L 4 952166 23011544 0.0413778
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
160 chr2L 5 967763 23011544 0.0420555
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
161 chr2L 6 986331 23011544 0.0428624
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
162 chr2L 7 998244 23011544 0.0433801
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
163 chr2L 8 995791 23011544 0.0432735
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
164 chr2L 9 996398 23011544 0.0432999
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
165
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
166
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
167 @REFERENCES@
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
168 ]]></help>
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
169 <expand macro="citations" />
a48ca51cb2de Uploaded
jackcurragh
parents:
diff changeset
170 </tool>