Mercurial > repos > bgruening > deeptools
comparison bamCompare.xml @ 30:5231f398d784 draft
planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 3bc1d1c6f4e28ac7ff8df79fe4e3f00a195938e6-dirty
author | bgruening |
---|---|
date | Tue, 20 Oct 2015 14:43:12 -0400 |
parents | 3a2aab18a217 |
children |
comparison
equal
deleted
inserted
replaced
29:3a2aab18a217 | 30:5231f398d784 |
---|---|
1 <tool id="deeptools_bamCompare" name="bamCompare" version="@WRAPPER_VERSION@.0"> | 1 <tool id="deeptools_bamCompare" name="bamCompare" version="@WRAPPER_VERSION@.0"> |
2 <description>normalizes and compares two BAM files to obtain the ratio, log2ratio or difference. (bam2bigwig)</description> | 2 <description>normalizes and compares two BAM files to obtain the ratio, log2ratio or difference. (bam2bigwig)</description> |
3 <expand macro="requirements" /> | |
4 <expand macro="stdio" /> | |
5 <macros> | 3 <macros> |
6 <token name="@BINARY@">bamCompare</token> | 4 <token name="@BINARY@">bamCompare</token> |
7 <import>deepTools_macros.xml</import> | 5 <import>deepTools_macros.xml</import> |
8 </macros> | 6 </macros> |
7 <expand macro="requirements" /> | |
9 <command> | 8 <command> |
9 <![CDATA[ | |
10 bamCompare | 10 bamCompare |
11 | 11 |
12 @THREADS@ | 12 @THREADS@ |
13 | 13 |
14 --bamfile1 '$bamFile1' | 14 --bamfile1 '$bamFile1' |
15 -bai1 '${bamFile1.metadata.bam_index}' | 15 -bai1 '${bamFile1.metadata.bam_index}' |
16 --bamfile2 '$bamFile2' | 16 --bamfile2 '$bamFile2' |
17 -bai2 '${bamFile2.metadata.bam_index}' | 17 -bai2 '${bamFile2.metadata.bam_index}' |
18 | 18 |
19 --outFileName '$outFileName' | 19 --outFileName '$outFileName' |
20 --outFileFormat '$outFileFormat' | 20 --outFileFormat '$outFileFormat' |
21 | 21 |
22 --fragmentLength $fragmentLength | 22 --fragmentLength $fragmentLength |
23 --binSize $binSize | 23 --binSize $binSize |
24 | 24 |
25 #if $scaling.method == 'SES': | 25 #if $scaling.method == 'SES': |
26 --scaleFactorsMethod SES | 26 --scaleFactorsMethod SES |
27 --sampleLength $scaling.sampleLength | 27 --sampleLength $scaling.sampleLength |
28 #elif $scaling.method == 'readCount': | 28 #elif $scaling.method == 'readCount': |
29 --scaleFactorsMethod readCount | 29 --scaleFactorsMethod readCount |
30 #elif $scaling.method == 'own': | 30 #elif $scaling.method == 'own': |
31 --scaleFactors '$scaling.scaleFactor1:$scaling.scaleFactor2' | 31 --scaleFactors '$scaling.scaleFactor1:$scaling.scaleFactor2' |
32 #end if | 32 #end if |
33 | 33 |
34 --ratio $comparison.type | 34 --ratio $comparison.type |
35 | 35 |
36 #if $comparison.type=='subtract': | 36 #if $comparison.type=='subtract': |
37 #if $comparison.normalization.type=='rpkm': | 37 #if $comparison.normalization.type=='rpkm': |
38 --normalizeUsingRPKM | 38 --normalizeUsingRPKM |
39 #elif $comparison.normalization.type=='1x': | 39 #elif $comparison.normalization.type=='1x': |
40 | 40 |
41 #if $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize_opt == "specific": | 41 #if $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize_opt == "specific": |
42 --normalizeTo1x $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize | 42 --normalizeTo1x $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize |
43 #else: | 43 #else: |
44 --normalizeTo1x $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize_opt | 44 --normalizeTo1x $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize_opt |
45 #end if | 45 #end if |
46 | 46 |
47 #end if | 47 #end if |
48 #elif $comparison.type in ['ratio','log2']: | 48 #elif $comparison.type in ['ratio','log2']: |
49 --pseudocount $comparison.pseudocount | 49 --pseudocount $comparison.pseudocount |
50 #end if | 50 #end if |
51 | 51 |
52 #if str($region).strip() != '': | 52 #if str($region).strip() != '': |
53 --region '$region' | 53 --region '$region' |
54 #end if | 54 #end if |
55 | 55 |
56 #if $advancedOpt.showAdvancedOpt == "yes": | 56 #if $advancedOpt.showAdvancedOpt == "yes": |
57 #if $advancedOpt.smoothLength: | 57 #if $advancedOpt.smoothLength: |
58 --smoothLength '$advancedOpt.smoothLength' | 58 --smoothLength '$advancedOpt.smoothLength' |
59 #end if | 59 #end if |
60 | 60 |
61 $advancedOpt.doNotExtendPairedEnds | 61 $advancedOpt.doNotExtendPairedEnds |
66 #end if | 66 #end if |
67 | 67 |
68 --missingDataAsZero $advancedOpt.missingDataAsZero | 68 --missingDataAsZero $advancedOpt.missingDataAsZero |
69 | 69 |
70 #if str($advancedOpt.ignoreForNormalization).strip() != '': | 70 #if str($advancedOpt.ignoreForNormalization).strip() != '': |
71 --ignoreForNormalization $advancedOpt.ignoreForNormalization | 71 --ignoreForNormalization '$advancedOpt.ignoreForNormalization' |
72 #end if | 72 #end if |
73 | 73 #if $samFlag: |
74 #end if | 74 --samFlag $samFlag |
75 | 75 #end if |
76 #end if | |
77 ]]> | |
76 </command> | 78 </command> |
77 | |
78 <inputs> | 79 <inputs> |
79 <param name="bamFile1" format="bam" type="data" label="First BAM file (e.g. treated sample)" | 80 <param name="bamFile1" format="bam" type="data" label="First BAM file (e.g. treated sample)" |
80 help="The BAM file must be sorted."/> | 81 help="The BAM file must be sorted."/> |
81 | |
82 <param name="bamFile2" format="bam" type="data" label="Second BAM file (e.g. control sample)" | 82 <param name="bamFile2" format="bam" type="data" label="Second BAM file (e.g. control sample)" |
83 help="The BAM file must be sorted."/> | 83 help="The BAM file must be sorted."/> |
84 | 84 <param name="fragmentLength" type="integer" value="200" min="1" |
85 <param name="fragmentLength" type="integer" value="300" min="1" | |
86 label="Length of the average fragment size" | 85 label="Length of the average fragment size" |
87 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."/> | 86 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. (--fragmentLength)"/> |
88 | 87 |
89 <param name="binSize" type="integer" value="50" min="1" | 88 <param name="binSize" type="integer" value="50" min="1" |
90 label="Bin size in bp" | 89 label="Bin size in bp" |
91 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. "/> | 90 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. (--binSize)"/> |
92 | 91 |
93 <conditional name="scaling"> | 92 <conditional name="scaling"> |
94 <param name="method" type="select" | 93 <param name="method" type="select" |
95 label="Method to use for scaling the largest sample to the smallest"> | 94 label="Method to use for scaling the largest sample to the smallest"> |
96 <option value="readCount" selected="true">read count</option> | 95 <option value="readCount" selected="true">read count</option> |
102 label="Length in base pairs used to sample the genome and compute the size or scaling factors to compare the two BAM files " | 101 label="Length in base pairs used to sample the genome and compute the size or scaling factors to compare the two BAM files " |
103 help="The default is fine. Only change it if you know what you are doing" /> | 102 help="The default is fine. Only change it if you know what you are doing" /> |
104 </when> | 103 </when> |
105 <when value="readCount" /> | 104 <when value="readCount" /> |
106 <when value="own"> | 105 <when value="own"> |
107 <param name="scaleFactor1" type="float" value="1" | 106 <expand macro="scaleFactor" /> |
108 label="Scale factor for treatment"/> | |
109 | |
110 <param name="scaleFactor2" type="float" value="1" | |
111 label="Scale factor for input"/> | |
112 </when> | 107 </when> |
113 </conditional> | 108 </conditional> |
114 | 109 |
115 <conditional name="comparison"> | 110 <conditional name="comparison"> |
116 <param name="type" type="select" | 111 <param name="type" type="select" |
117 label="How to compare the two files"> | 112 label="How to compare the two files" |
118 <option value="log2" selected="true">compute log2 of the number of reads ratio</option> | 113 help="The default is to output the log2ratio between the two samples. |
119 <option value="ratio">compute the ratio of the number of reads</option> | 114 The reciprocal ratio returns the negative of the inverse of the ratio if |
120 <option value="subtract">compute difference (subtract input from treatment) of the number of reads</option> | 115 the ratio is less than 0. The resulting values are interpreted as negative fold changes."> |
116 <option value="log2" selected="true">Compute log2 of the number of reads ratio</option> | |
117 <option value="ratio">Compute the ratio of the number of reads</option> | |
118 <option value="subtract">Compute difference (subtract input from treatment) of the number of reads</option> | |
119 <option value="add">Compute the sum of number of reads</option> | |
120 <option value="reciprocal_ratio">Computes the fold change. If the fold change is less than 1, the negative of the inverse is reported. E.g. A fold change of 10 to 5 would be reported not as 0.5 but as -2</option> | |
121 </param> | 121 </param> |
122 <when value="log2"> | 122 <when value="log2"> |
123 <expand macro="pseudocount" /> | 123 <expand macro="pseudocount" /> |
124 </when> | 124 </when> |
125 <when value="ratio"> | 125 <when value="ratio"> |
126 <expand macro="pseudocount" /> | |
127 </when> | |
128 <when value="add" /> | |
129 <when value="reciprocal_ratio"> | |
126 <expand macro="pseudocount" /> | 130 <expand macro="pseudocount" /> |
127 </when> | 131 </when> |
128 <when value="subtract"> | 132 <when value="subtract"> |
129 <conditional name="normalization"> | 133 <conditional name="normalization"> |
130 <param name="type" type="select" label="Normalization method" > | 134 <param name="type" type="select" label="Normalization method" > |
143 | 147 |
144 <param name="outFileFormat" type="select" label="Coverage file format"> | 148 <param name="outFileFormat" type="select" label="Coverage file format"> |
145 <option value="bigwig" selected="true">bigwig</option> | 149 <option value="bigwig" selected="true">bigwig</option> |
146 <option value="bedgraph">bedgraph</option> | 150 <option value="bedgraph">bedgraph</option> |
147 </param> | 151 </param> |
148 | |
149 <expand macro="region_limit_operation" /> | 152 <expand macro="region_limit_operation" /> |
150 | |
151 <conditional name="advancedOpt"> | 153 <conditional name="advancedOpt"> |
152 <param name="showAdvancedOpt" type="select" label="Show advanced options" > | 154 <param name="showAdvancedOpt" type="select" label="Show advanced options" > |
153 <option value="no" selected="true">no</option> | 155 <option value="no" selected="true">no</option> |
154 <option value="yes">yes</option> | 156 <option value="yes">yes</option> |
155 </param> | 157 </param> |
156 <when value="no" /> | 158 <when value="no" /> |
157 <when value="yes"> | 159 <when value="yes"> |
158 | |
159 <param name="smoothLength" type="integer" value="1" optional="true" min="1" | 160 <param name="smoothLength" type="integer" value="1" optional="true" min="1" |
160 label="Smooth values using the following length (in bp)" | 161 label="Smooth values using the following length (in bp)" |
161 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."/> | 162 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. (--smoothLength)"/> |
162 | 163 <expand macro="doNotExtendPairedEnds" /> |
163 <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue="" | 164 <expand macro="ignoreDuplicates" /> |
164 label="Do not extend paired ends" | 165 <expand macro="minMappingQuality" /> |
165 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."/> | |
166 | |
167 <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue="" | |
168 label="Ignore duplicates" | |
169 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." /> | |
170 | |
171 <param name="minMappingQuality" type="integer" optional="true" value="1" min="1" | |
172 label="Minimum mapping quality (e.g. BOWTIE2 measures)" | |
173 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."/> | |
174 | |
175 <expand macro="missingDataAsZero" /> | 166 <expand macro="missingDataAsZero" /> |
176 | |
177 <param name="ignoreForNormalization" type="text" value="" size="50" | 167 <param name="ignoreForNormalization" type="text" value="" size="50" |
178 label="regions that should be excluded for calculating the scaling factor" | 168 label="regions that should be excluded for calculating the scaling factor" |
179 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" /> | 169 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" /> |
180 | 170 <expand macro="samFlag" /> |
181 </when> | 171 </when> |
182 </conditional> | 172 </conditional> |
183 | |
184 </inputs> | 173 </inputs> |
185 <outputs> | 174 <outputs> |
186 <data format="bigwig" name="outFileName"> | 175 <data format="bigwig" name="outFileName"> |
187 <change_format> | 176 <change_format> |
188 <when input="outFileFormat" value="bigwig" format="bigwig" /> | 177 <when input="outFileFormat" value="bigwig" format="bigwig" /> |
189 <when input="outFileFormat" value="bedgraph" format="bedgraph" /> | 178 <when input="outFileFormat" value="bedgraph" format="bedgraph" /> |
190 </change_format> | 179 </change_format> |
191 </data> | 180 </data> |
192 </outputs> | 181 </outputs> |
182 <tests> | |
183 <test> | |
184 <param name="bamFile1" value="bowtie2-test1.bam" ftype="bam" /> | |
185 <param name="bamFile2" value="bowtie2-test1.bam" ftype="bam" /> | |
186 <param name="showAdvancedOpt" value="no" /> | |
187 <param name="outFileFormat" value="bigwig" /> | |
188 <param name="fragmentLength" value="100" /> | |
189 <param name="outFileFormat" value="bedgraph" /> | |
190 <param name="binSize" value="5" /> | |
191 <param name="type" value="ratio" /> | |
192 <output name="outFileName" file="bamCompare_result1.bg" ftype="bedgraph" /> | |
193 </test> | |
194 </tests> | |
193 <help> | 195 <help> |
194 | 196 <![CDATA[ |
195 **What it does** | 197 **What it does** |
196 | 198 |
197 This tool compares two BAM files based on the number of mapped reads. To | 199 This tool compares two BAM files based on the number of mapped reads. To |
198 compare the BAM files, the genome is partitioned into bins of equal size, then | 200 compare the BAM files, the genome is partitioned into bins of equal size, then |
199 the number of reads found in each BAM file is counted for such bins and | 201 the number of reads found in each BAM file is counted for such bins and |
222 - same as for bamCoverage, except that you now obtain 1 coverage file that is based on 2 BAM files. | 224 - same as for bamCoverage, except that you now obtain 1 coverage file that is based on 2 BAM files. |
223 | 225 |
224 ----- | 226 ----- |
225 | 227 |
226 @REFERENCES@ | 228 @REFERENCES@ |
227 | 229 ]]> |
228 </help> | 230 </help> |
229 <expand macro="citations" /> | 231 <expand macro="citations" /> |
230 </tool> | 232 </tool> |