Mercurial > repos > bgruening > deeptools_bam_coverage
comparison bamCoverage.xml @ 33:6a5dfb2c0c60 draft
planemo upload for repository https://github.com/deeptools/deepTools/tree/master/galaxy/wrapper/ commit b1f975422b307927bbbe245d57609e9464d5d5c8-dirty
author | bgruening |
---|---|
date | Thu, 15 Feb 2018 04:15:07 -0500 |
parents | f82a4c20e3bf |
children | e57332b94d4f |
comparison
equal
deleted
inserted
replaced
32:33d88fda6240 | 33:6a5dfb2c0c60 |
---|---|
1 <tool id="deeptools_bam_coverage" name="bamCoverage" version="@WRAPPER_VERSION@.0"> | 1 <tool id="deeptools_bam_coverage" name="bamCoverage" version="@WRAPPER_VERSION@.0"> |
2 <description>generates a coverage bigWig file from a given BAM file</description> | 2 <description>generates a coverage bigWig file from a given BAM or CRAM file</description> |
3 <macros> | 3 <macros> |
4 <token name="@BINARY@">bamCoverage</token> | 4 <token name="@BINARY@">bamCoverage</token> |
5 <import>deepTools_macros.xml</import> | 5 <import>deepTools_macros.xml</import> |
6 </macros> | 6 </macros> |
7 <expand macro="requirements" /> | 7 <expand macro="requirements" /> |
8 <command> | 8 <command> |
9 <![CDATA[ | 9 <![CDATA[ |
10 ln -s '$bamInput' one.bam && | 10 ln -s '$bamInput' one.bam && |
11 ln -s '${bamInput.metadata.bam_index}' one.bam.bai && | 11 #if $bamInput.ext == 'bam': |
12 ln -s '${bamInput.metadata.bam_index}' one.bam.bai && | |
13 #else: | |
14 ln -s '${bamInput.metadata.cram_index}' one.bam.crai && | |
15 #end if | |
12 | 16 |
13 @BINARY@ | 17 @BINARY@ |
14 @THREADS@ | 18 @THREADS@ |
15 | 19 |
16 --bam one.bam | 20 --bam one.bam |
18 --outFileFormat '$outFileFormat' | 22 --outFileFormat '$outFileFormat' |
19 | 23 |
20 --binSize $binSize | 24 --binSize $binSize |
21 | 25 |
22 #if $scaling.type=='rpkm': | 26 #if $scaling.type=='rpkm': |
23 --normalizeUsingRPKM | 27 --normalizeUsing RPKM |
28 #elif $scaling.type=='cpm': | |
29 --normalizeUsing CPM | |
30 #elif $scaling.type=='bpm': | |
31 --normalizeUsing BPM | |
24 #elif $scaling.type=='1x': | 32 #elif $scaling.type=='1x': |
33 --normalizeUsing RPGC | |
25 #if $scaling.effectiveGenomeSize.effectiveGenomeSize_opt == "specific": | 34 #if $scaling.effectiveGenomeSize.effectiveGenomeSize_opt == "specific": |
26 --normalizeTo1x $scaling.effectiveGenomeSize.effectiveGenomeSize | 35 --effectiveGenomeSize $scaling.effectiveGenomeSize.effectiveGenomeSize |
27 #else: | 36 #else: |
28 --normalizeTo1x $scaling.effectiveGenomeSize.effectiveGenomeSize_opt | 37 --effectiveGenomeSize $scaling.effectiveGenomeSize.effectiveGenomeSize_opt |
29 #end if | 38 #end if |
30 #end if | 39 #end if |
31 | 40 |
32 #if str($region).strip() != '': | 41 #if str($region).strip() != '': |
33 --region '$region' | 42 --region '$region' |
61 #end if | 70 #end if |
62 ]]> | 71 ]]> |
63 </command> | 72 </command> |
64 | 73 |
65 <inputs> | 74 <inputs> |
66 <param name="bamInput" format="bam" type="data" label="BAM file" | 75 <param name="bamInput" format="bam,cram" type="data" label="BAM/CRAM file" |
67 help=""/> | 76 help=""/> |
68 | 77 |
69 <param name="binSize" type="integer" value="50" min="1" | 78 <param name="binSize" type="integer" value="50" min="1" |
70 label="Bin size in bases" | 79 label="Bin size in bases" |
71 help="The genome will be divided into bins of the specified size. For each bin, the overlaping number of fragments (or reads) will be reported. If only half a fragment overlaps, this fraction will be reported. "/> | 80 help="The genome will be divided into bins of the specified size. For each bin, the overlaping number of fragments (or reads) will be reported. If only half a fragment overlaps, this fraction will be reported. "/> |
72 | 81 |
73 <conditional name="scaling"> | 82 <conditional name="scaling"> |
74 <param name="type" type="select" label="Scaling/Normalization method" > | 83 <param name="type" type="select" label="Scaling/Normalization method" > |
75 <option value="1x">Normalize coverage to 1x</option> | 84 <option value="1x">Normalize coverage to 1x</option> |
76 <option value="rpkm">Normalize to fragments (reads) per kilobase per million (RPKM)</option> | 85 <option value="rpkm">Normalize to reads per kilobase per million (RPKM)</option> |
86 <option value="cpm">Normalize to counts per million (CPM), same as CPM in RNA-seq</option> | |
87 <option value="bpm">Normalize to bins per million (BPM), same as TPM in RNA-seq</option> | |
77 <option value="no">Do not normalize or scale</option> | 88 <option value="no">Do not normalize or scale</option> |
78 </param> | 89 </param> |
79 <when value="rpkm"/> | 90 <when value="rpkm"/> |
91 <when value="cpm"/> | |
92 <when value="bpm"/> | |
80 <when value="no"/> | 93 <when value="no"/> |
81 <when value="1x"> | 94 <when value="1x"> |
82 <expand macro="effectiveGenomeSize" /> | 95 <expand macro="effectiveGenomeSize" /> |
83 </when> | 96 </when> |
84 </conditional> | 97 </conditional> |
127 offset of 0 is not permitted. If two values (separated by spaces) are specified, then they will be | 140 offset of 0 is not permitted. If two values (separated by spaces) are specified, then they will be |
128 used to specify a range of positions. Note that specifying something like | 141 used to specify a range of positions. Note that specifying something like |
129 --Offset 5 -1 will result in the 5th through last position being used, which | 142 --Offset 5 -1 will result in the 5th through last position being used, which |
130 is equivalent to trimming 4 bases from the 5-prime end of alignments." /> | 143 is equivalent to trimming 4 bases from the 5-prime end of alignments." /> |
131 | 144 |
132 <param argument="filterRNAstrand" type="select" label="Only include reads originating from fragments from the forward or reverse strand." | 145 <param argument="filterRNAstrand" type="select" label="Only include reads originating from fragments from the forward or reverse strand." |
133 help="By default (the no option), all reads are processed, regardless of the strand they originated from. For RNAseq, it can be useful to separately create bigWig files for the forward or reverse strands. | 146 help="By default (the no option), all reads are processed, regardless of the strand they originated from. For RNAseq, it can be useful to separately create bigWig files for the forward or reverse strands. |
134 Note that this tools assumes that a dUTP-based method was used, so fragments will be assigned to the reverse strand if the second read in a pair is reverse complemented."> | 147 Note that this tools assumes that a dUTP-based method was used, so fragments will be assigned to the reverse strand if the second read in a pair is reverse complemented."> |
135 <option value="no" selected="true">no</option> | 148 <option value="no" selected="true">no</option> |
136 <option value="forward">forward</option> | 149 <option value="forward">forward</option> |
137 <option value="reverse">reverse</option> | 150 <option value="reverse">reverse</option> |
160 </test> | 173 </test> |
161 <test> | 174 <test> |
162 <param name="bamInput" value="bowtie2 test1.bam" ftype="bam" /> | 175 <param name="bamInput" value="bowtie2 test1.bam" ftype="bam" /> |
163 <param name="outFileFormat" value="bigwig" /> | 176 <param name="outFileFormat" value="bigwig" /> |
164 <param name="showAdvancedOpt" value="no" /> | 177 <param name="showAdvancedOpt" value="no" /> |
178 <param name="effectiveGenomeSize_opt" value="specific" /> | |
179 <param name="effectiveGenomeSize" value="2451960000" /> | |
165 <param name="binSize" value="10" /> | 180 <param name="binSize" value="10" /> |
166 <output name="outFileName" file="bamCoverage_result2.bw" ftype="bigwig" /> | 181 <output name="outFileName" file="bamCoverage_result2.bw" ftype="bigwig" /> |
167 </test> | 182 </test> |
168 <test> | 183 <test> |
169 <param name="bamInput" value="bowtie2 test1.bam" ftype="bam" /> | 184 <param name="bamInput" value="bowtie2 test1.bam" ftype="bam" /> |
170 <param name="outFileFormat" value="bedgraph" /> | 185 <param name="outFileFormat" value="bedgraph" /> |
171 <param name="showAdvancedOpt" value="no" /> | 186 <param name="showAdvancedOpt" value="no" /> |
187 <param name="effectiveGenomeSize_opt" value="specific" /> | |
188 <param name="effectiveGenomeSize" value="2451960000" /> | |
172 <param name="binSize" value="10" /> | 189 <param name="binSize" value="10" /> |
173 <output name="outFileName" file="bamCoverage_result3.bg" ftype="bedgraph" /> | 190 <output name="outFileName" file="bamCoverage_result3.bg" ftype="bedgraph" /> |
174 </test> | 191 </test> |
175 <test> | 192 <test> |
176 <param name="bamInput" value="phiX.bam" ftype="bam" /> | 193 <param name="bamInput" value="phiX.bam" ftype="bam" /> |
177 <param name="outFileFormat" value="bigwig" /> | 194 <param name="outFileFormat" value="bigwig" /> |
178 <param name="showAdvancedOpt" value="no" /> | 195 <param name="showAdvancedOpt" value="no" /> |
196 <param name="effectiveGenomeSize_opt" value="specific" /> | |
197 <param name="effectiveGenomeSize" value="2451960000" /> | |
179 <param name="binSize" value="10" /> | 198 <param name="binSize" value="10" /> |
180 <output name="outFileName" file="bamCoverage_result4.bw" ftype="bigwig" /> | 199 <output name="outFileName" file="bamCoverage_result4.bw" ftype="bigwig" /> |
181 </test> | 200 </test> |
182 <test> | 201 <test> |
183 <param name="bamInput" value="phiX.bam" ftype="bam" /> | 202 <param name="bamInput" value="phiX.bam" ftype="bam" /> |
184 <param name="outFileFormat" value="bedgraph" /> | 203 <param name="outFileFormat" value="bedgraph" /> |
185 <param name="showAdvancedOpt" value="yes" /> | 204 <param name="showAdvancedOpt" value="yes" /> |
205 <param name="effectiveGenomeSize_opt" value="specific" /> | |
206 <param name="effectiveGenomeSize" value="2451960000" /> | |
186 <param name="binSize" value="10" /> | 207 <param name="binSize" value="10" /> |
187 <output name="outFileName" file="bamCoverage_result4.bg" ftype="bedgraph" /> | 208 <output name="outFileName" file="bamCoverage_result4.bg" ftype="bedgraph" /> |
188 </test> | 209 </test> |
189 <test> | 210 <test> |
190 <param name="bamInput" value="phiX.bam" ftype="bam" /> | 211 <param name="bamInput" value="phiX.bam" ftype="bam" /> |
191 <param name="outFileFormat" value="bigwig" /> | 212 <param name="outFileFormat" value="bigwig" /> |
192 <param name="showAdvancedOpt" value="yes" /> | 213 <param name="showAdvancedOpt" value="yes" /> |
193 <param name="filterRNAstrand" value="reverse" /> | 214 <param name="filterRNAstrand" value="reverse" /> |
215 <param name="effectiveGenomeSize_opt" value="specific" /> | |
216 <param name="effectiveGenomeSize" value="2451960000" /> | |
194 <param name="binSize" value="10" /> | 217 <param name="binSize" value="10" /> |
195 <output name="outFileName" file="bamCoverage_result5.bw" ftype="bigwig" /> | 218 <output name="outFileName" file="bamCoverage_result5.bw" ftype="bigwig" /> |
196 </test> | 219 </test> |
197 <test> | 220 <test> |
198 <param name="bamInput" value="bowtie2 test1.bam" ftype="bam" /> | 221 <param name="bamInput" value="bowtie2 test1.bam" ftype="bam" /> |
213 -------------- | 236 -------------- |
214 | 237 |
215 Given a BAM file, this tool generates a bigWig or bedGraph file of fragment or | 238 Given a BAM file, this tool generates a bigWig or bedGraph file of fragment or |
216 read coverages. The way the method works is by first calculating all the | 239 read coverages. The way the method works is by first calculating all the |
217 number of reads (either extended to match the fragment length or not) that | 240 number of reads (either extended to match the fragment length or not) that |
218 overlap each bin in the genome. The resulting read counts can be normalized | 241 overlap each bin in the genome. Various options are available to normalize the reads: |
219 using either a given scaling factor, the RPKM formula or to get a 1x depth of | 242 1) using a given scaling factor |
220 coverage (RPGC). In the case of paired-end mapping, each read mate is treated | 243 2) RPKM (reads per kilobase per million) : RPKM (per bin) = number of reads per bin / ( number of mapped reads (in millions) * bin length (kb) ). |
244 3) CPM (counts per million) : CPM (per bin) = number of reads per bin / number of mapped reads (in millions). | |
245 4) BPM (bins per million) : BPM (per bin) = number of reads per bin / sum of all reads per bin (in millions). | |
246 5) RPGC (1x sequencing depth ) : number of reads per bin /(total number of mapped reads * fragment length / effective genome size) | |
247 | |
248 In the case of paired-end mapping, each read mate is treated | |
221 independently to avoid a bias when a mixture of concordant and discordant | 249 independently to avoid a bias when a mixture of concordant and discordant |
222 pairs is present. This means that *each end* will be extended to match the | 250 pairs is present. This means that *each end* will be extended to match the |
223 fragment length. | 251 fragment length. |
224 | 252 |
225 See the usage hints below. | 253 See the usage hints below. |