annotate bamCoverage.xml @ 0:03e5e7b2cedd draft default tip

Uploaded
author devteam
date Thu, 14 Nov 2013 15:58:04 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
1 <tool id="deeptools_bamCoverage" name="bamCoverage" version="1.0">
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
2 <description> generates a coverage bigWig file from a given BAM file. Multiple options are available to count reads and normalize coverage. (bam2bigwig)</description>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
3 <expand macro="requirements" />
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
4 <macros>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
5 <import>deepTools_macros.xml</import>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
6 </macros>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
7 <command>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
8 bamCoverage
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
9
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
10 @THREADS@
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
11
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
12 --bam '$bamInput'
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
13 --bamIndex ${bamInput.metadata.bam_index}
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
14 --outFileName '$outFileName'
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
15 --outFileFormat '$outFileFormat'
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
16
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
17 --fragmentLength $fragmentLength
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
18 --binSize $binSize
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
19
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
20 #if $scaling.type=='rpkm':
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
21 --normalizeUsingRPKM
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
22 #elif $scaling.type=='1x':
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
23 --normalizeTo1x $scaling.normalizeTo1x
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
24 #elif $scaling.type=='own':
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
25 --scaleFactor $scaling.scaleFactor
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
26 #end if
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
27
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
28 ##if str($ignoreForNormalization).strip() != '':
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
29 ## --ignoreForNormalization $ignoreForNormalization
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
30 ##end if
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
31
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
32 #if $advancedOpt.showAdvancedOpt == "yes":
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
33 #if $advancedOpt.smoothLength:
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
34 --smoothLength '$advancedOpt.smoothLength'
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
35 #end if
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
36
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
37 #if str($advancedOpt.region.value) != '':
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
38 --region '$advancedOpt.region'
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
39 #end if
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
40 $advancedOpt.doNotExtendPairedEnds
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
41 $advancedOpt.ignoreDuplicates
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
42
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
43 #if $advancedOpt.minMappingQuality:
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
44 --minMappingQuality '$advancedOpt.minMappingQuality'
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
45 #end if
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
46
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
47 #end if
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
48 </command>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
49
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
50 <inputs>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
51 <param name="bamInput" format="bam" type="data" label="Input BAM file"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
52 help="The BAM file must be sorted."/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
53
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
54 <param name="fragmentLength" type="integer" value="300" min="1"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
55 label="Length of the average fragment size"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
56 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 &quot;normalize coverage to 1x&quot;). 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."/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
57
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
58 <param name="binSize" type="integer" value="50" min="1"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
59 label="Bin size in bp"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
60 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. "/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
61
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
62 <conditional name="scaling">
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
63 <param name="type" type="select" label="Scaling/Normalization method" >
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
64 <option value="1x">Normalize coverage to 1x</option>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
65 <option value="rpkm">Normalize to fragments (reads) per kilobase per million (RPKM)</option>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
66 <option value="own">Set your own scaling factor</option>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
67 <option value="no">Do not normalize or scale</option>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
68 </param>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
69 <when value="rpkm"/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
70 <when value="no"/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
71 <when value="1x">
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
72 <param name="normalizeTo1x" type="integer" value="2150570000"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
73 label="Genome size"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
74 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."/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
75 </when>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
76 <when value="own">
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
77 <param name="scaleFactor" type="float" value="1" size="3"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
78 label="Scale factor to multiply all values" />
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
79 </when>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
80 </conditional>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
81
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
82 <!--
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
83 Not yet supported.
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
84 <param name="ignoreForNormalization" type="text" value="" size="50"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
85 label="regions that should be excluded for calculating the scaling factor"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
86 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" />
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
87 -->
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
88
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
89 <param name="outFileFormat" type="select" label="Coverage file format">
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
90 <option value="bigwig" selected="true">bigwig</option>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
91 <option value="bedgraph">bedgraph</option>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
92 </param>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
93
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
94 <conditional name="advancedOpt">
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
95 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
96 <option value="no" selected="true">no</option>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
97 <option value="yes">yes</option>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
98 </param>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
99 <when value="no" />
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
100 <when value="yes">
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
101 <param name="smoothLength" type="integer" value="1" optional="true" min="1"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
102 label="Smooth values using the following length (in bp)"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
103 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."/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
104
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
105 <param name="region" type="text" value=""
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
106 label="Region of the genome to limit the operation to"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
107 help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example &quot;chr10&quot; or &quot;chr10:456700:891000&quot;" />
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
108
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
109 <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue=""
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
110 label="Do not extend paired ends"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
111 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."/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
112
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
113 <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue=""
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
114 label="Ignore duplicates"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
115 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." />
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
116
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
117 <param name="minMappingQuality" type="integer" optional="true" value="1" min="1"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
118 label="Minimum mapping quality"
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
119 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."/>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
120 </when>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
121 </conditional>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
122 </inputs>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
123 <outputs>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
124 <data format="bigwig" name="outFileName">
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
125 <change_format>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
126 <when input="outFileFormat" value="bigwig" format="bigwig" />
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
127 <when input="outFileFormat" value="bedgraph" format="bedgraph" />
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
128 </change_format>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
129 </data>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
130 </outputs>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
131 <help>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
132
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
133 **What it does**
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
134
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
135 Given a BAM file, this tool generates a bigWig or bedGraph file of fragment or read coverages.
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
136 The way the method works is by first calculating all the number of reads (either extended to match the fragment length or not)
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
137 that overlap each bin in the genome. Bins with zero counts are skipped, i.e. not added to the output file.
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
138 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).
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
139
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
140
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
141 .. image:: $PATH_TO_IMAGES/norm_IGVsnapshot_indFiles.png
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
142
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
143
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
144 **Output files**:
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
145
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
146 - coverage file either in bigWig or bedGraph format
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
147
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
148 -----
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
149
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
150 .. class:: infomark
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
151
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
152 @REFERENCES@
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
153
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
154 </help>
03e5e7b2cedd Uploaded
devteam
parents:
diff changeset
155 </tool>