annotate bedtools_genomecov/genomeCoverageBed.xml @ 0:b63479816ebe draft

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