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