6
|
1 <tool id="deeptools_bamCoverage" name="bamCoverage" version="1.0">
|
|
2 <description> generates a coverage bigWig file from a given BAM file. Multiple options are available to count reads and normalize coverage.</description>
|
0
|
3 <requirements>
|
9
|
4 <requirement type="package" version="1.5.1_3e13687c89e951476776b15afb4bbbc3b906f761">deepTools</requirement>
|
0
|
5 <requirement type="package" version="0.1">ucsc_tools</requirement>
|
|
6 <requirement type="package" version="1.7.1">numpy</requirement>
|
6
|
7 <requirement type="package" >deepTools</requirement>
|
0
|
8 </requirements>
|
1
|
9 <command>
|
|
10 bamCoverage
|
|
11
|
|
12 ##ToDo
|
|
13 --numberOfProcessors 4
|
|
14
|
0
|
15 --bam '$bamInput'
|
|
16 --bamIndex ${bamInput.metadata.bam_index}
|
|
17 --outFileName '$outFileName'
|
|
18 --outFileFormat '$outFileFormat'
|
|
19
|
|
20 --fragmentLength $fragmentLength
|
|
21 --binSize $binSize
|
|
22
|
|
23 #if $scaling.type=='rpkm':
|
|
24 --normalizeUsingRPKM
|
|
25 #elif $scaling.type=='1x':
|
|
26 --normalizeTo1x $scaling.normalizeTo1x
|
|
27 #elif $scaling.type=='own':
|
|
28 --scaleFactor $scaling.scaleFactor
|
|
29 #end if
|
6
|
30
|
|
31 ##if str($ignoreForNormalization).strip() != '':
|
|
32 ## --ignoreForNormalization $ignoreForNormalization
|
|
33 ##end if
|
|
34
|
0
|
35 #if $advancedOpt.showAdvancedOpt == "yes":
|
|
36 #if $advancedOpt.smoothLength:
|
|
37 --smoothLength '$advancedOpt.smoothLength'
|
|
38 #end if
|
1
|
39
|
0
|
40 #if str($advancedOpt.region.value) != '':
|
|
41 --region '$advancedOpt.region'
|
|
42 #end if
|
|
43 $advancedOpt.doNotExtendPairedEnds
|
|
44 $advancedOpt.ignoreDuplicates
|
1
|
45
|
0
|
46 #if $advancedOpt.minMappingQuality:
|
|
47 --minMappingQuality '$advancedOpt.minMappingQuality'
|
|
48 #end if
|
1
|
49
|
0
|
50 #end if
|
|
51 </command>
|
|
52
|
|
53 <inputs>
|
|
54 <param name="bamInput" format="bam" type="data" label="Input BAM file"
|
6
|
55 help="The BAM file must be sorted."/>
|
0
|
56
|
|
57 <param name="fragmentLength" type="integer" value="300" min="1"
|
|
58 label="Length of the average fragment size"
|
|
59 help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. If this value is set to the read length or smaller, the read will not be extended. *Warning* the fragment length affects the normalization to 1x (see "normalize coverage to 1x"). The formula to normalize using the sequencing depth is genomeSize/(number of mapped reads * fragment length). *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/>
|
|
60
|
|
61 <param name="binSize" type="integer" value="50" min="1"
|
|
62 label="Bin size in bp"
|
|
63 help="The genome will be divided in bins (also called tiles) of the specified length. For each bin the overlaping number of fragments (or reads) will be reported. If only half a fragment overlaps, this fraction will be reported. "/>
|
|
64
|
|
65 <conditional name="scaling">
|
|
66 <param name="type" type="select" label="Scaling/Normalization method" >
|
|
67 <option value="1x">Normalize coverage to 1x</option>
|
|
68 <option value="rpkm">Normalize to fragments (reads) per kilobase per million (RPKM)</option>
|
|
69 <option value="own">Set your own scaling factor</option>
|
|
70 <option value="no">Do not normalize or scale</option>
|
|
71 </param>
|
|
72 <when value="rpkm"/>
|
|
73 <when value="no"/>
|
|
74 <when value="1x">
|
1
|
75 <param name="normalizeTo1x" type="integer" value="2150570000"
|
0
|
76 label="Genome size"
|
|
77 help ="Enter the genome size to normalize the reads counts. Sequencing depth is defined as the total number of mapped reads * fragment length / effective genome size. To use this option, the effective genome size has to be given. Common values are: mm9: 2150570000, hg19:2451960000, dm3:121400000 and ce10:93260000."/>
|
|
78 </when>
|
|
79 <when value="own">
|
1
|
80 <param name="scaleFactor" type="float" value="1" size="3"
|
0
|
81 label="Scale factor to multiply all values" />
|
1
|
82 </when>
|
0
|
83 </conditional>
|
|
84
|
6
|
85 <!--
|
|
86 Not yet supported.
|
|
87 <param name="ignoreForNormalization" type="text" value="" size="50"
|
|
88 label="regions that should be excluded for calculating the scaling factor"
|
|
89 help="Sometimes it makes sense to exclude certain regions when calculating the scaling factor. For example, if you know some regions that you suspect to be present more often in your sample's genome than in the reference genome that will therefore accumulate reads (CNV). Another typical example is the single X chromosome in male samples that should be scaled separately from the diploid autosomes. For example chrX,chrY,chr3. or chr10:12220-128932" />
|
|
90 -->
|
|
91
|
0
|
92 <param name="outFileFormat" type="select" label="Coverage file format">
|
|
93 <option value="bigwig" selected="true">bigwig</option>
|
1
|
94 <option value="bedgraph">bedgraph</option>
|
0
|
95 </param>
|
1
|
96
|
0
|
97 <conditional name="advancedOpt">
|
1
|
98 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
|
|
99 <option value="no" selected="true">no</option>
|
|
100 <option value="yes">yes</option>
|
|
101 </param>
|
0
|
102 <when value="no" />
|
|
103 <when value="yes">
|
1
|
104 <param name="smoothLength" type="integer" value="1" optional="true" min="1"
|
|
105 label="Smooth values using the following length (in bp)"
|
|
106 help ="The smooth length defines a window, larger than the bin size, to average the number of reads. For example, if the bin size is set to 20 bp and the smooth length is set to 60 bp, then, for each bin size the average of it and its left and right neighbors is considered. Any value smaller than the bin size will be ignored and no smoothing will be applied."/>
|
|
107
|
|
108 <param name="region" type="text" value=""
|
|
109 label="Region of the genome to limit the operation to"
|
|
110 help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example "chr10" or "chr10:456700:891000"" />
|
0
|
111
|
1
|
112 <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue=""
|
|
113 label="Do not extend paired ends"
|
|
114 help="If set, reads are not extended to match the fragment length reported in the BAM file, instead they will be extended to match the fragment length. Default is to extend the reads if paired end information is available."/>
|
0
|
115
|
1
|
116 <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue=""
|
|
117 label="Ignore duplicates"
|
|
118 help="If set, reads that have the same orientation and start position will be considered only once. If reads are paired, the mate position also has to coincide to ignore a read." />
|
|
119
|
|
120 <param name="minMappingQuality" type="integer" optional="true" value="1" min="1"
|
|
121 label="Minimum mapping quality"
|
6
|
122 help= "If set, only reads that have a mapping quality score higher than the given value are considered. *Note* Bowtie's Mapping quality is related to uniqueness: the higher the score, the more unique is a read. A mapping quality defined by Bowtie of 10 or less indicates that there is at least a 1 in 10 chance that the read truly originated elsewhere."/>
|
1
|
123 </when>
|
|
124 </conditional>
|
0
|
125 </inputs>
|
|
126 <outputs>
|
|
127 <data format="bigwig" name="outFileName">
|
1
|
128 <change_format>
|
|
129 <when input="outFileFormat" value="bigwig" format="bigwig" />
|
|
130 <when input="outFileFormat" value="bedgraph" format="bedgraph" />
|
|
131 </change_format>
|
0
|
132 </data>
|
|
133 </outputs>
|
|
134 <help>
|
|
135
|
|
136 **What it does**
|
|
137
|
|
138 Given a BAM file, this tool generates a bigWig or bedGraph file of fragment or read coverages. The way the method works is by first calculating all the number of reads (either extended to match the fragment length or not) that overlap each bin in the genome. Bins with zero counts are skipped, i.e. not added to the output file. The resulting read counts can be normalized using either a given scaling factor, the RPKM formula or to get a 1x depth of coverage (RPGC).
|
|
139
|
|
140 -----
|
|
141
|
|
142 .. class:: infomark
|
|
143
|
6
|
144 If you would like to give us feedback or you run into any trouble, please send an email to deeptools@googlegroups.com
|
0
|
145
|
|
146 This tool is developed by the `Bioinformatics and Deep-Sequencing Unit`_ at the `Max Planck Institute for Immunobiology and Epigenetics`_.
|
|
147
|
|
148
|
|
149 .. _Bioinformatics and Deep-Sequencing Unit: http://www3.ie-freiburg.mpg.de/facilities/research-facilities/bioinformatics-and-deep-sequencing-unit/
|
|
150 .. _Max Planck Institute for Immunobiology and Epigenetics: http://www3.ie-freiburg.mpg.de
|
|
151
|
|
152 </help>
|
|
153 </tool>
|