annotate bedtools_genomecov/genomeCoverageBed.xml @ 0:c00e205995dd draft

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