Skip to content

Commit c7a085f

Browse files
committed
Merge branch '4.0.0' of github.com:deeptools/deepTools into bamcov_rs
2 parents 4f79bb1 + 90ce478 commit c7a085f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+466
-503
lines changed

galaxy/wrapper/alignmentSieve.xml

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<token name="@BINARY@">alignmentSieve</token>
55
<import>deepTools_macros.xml</import>
66
</macros>
7-
<expand macro="requirements" />
7+
<expand macro="requirements"/>
88
<command>
99
<![CDATA[
1010
#import re
@@ -15,21 +15,18 @@
1515
#else:
1616
ln -s '${bamfile.metadata.cram_index}' one.bam.crai &&
1717
#end if
18-
1918
@BINARY@
2019
@THREADS@
2120
-b one.bam
22-
2321
--label '$label'
24-
25-
#if str($filterRNAstrand) != 'no':
22+
#if $filterRNAstrand:
2623
--filterRNAstrand '$filterRNAstrand'
2724
#end if
2825
2926
$ignoreDuplicates
3027
3128
#if $minMappingQuality:
32-
--minMappingQuality '$minMappingQuality'
29+
--minMappingQuality $minMappingQuality
3330
#end if
3431
3532
#if $samFlagInclude:
@@ -86,9 +83,8 @@
8683
</command>
8784

8885
<inputs>
89-
<param name="bamfile" format="bam,cram" type="data" label="BAM file" />
90-
<param name="BED" argument="--BED" type="boolean" label="Output in BEDPE format?"
91-
help="Instead of producing BAM files, write output in BEDPE format (as defined by MACS2). Note that only reads/fragments passing filtering criterion are written in BEDPE format." />
86+
<param name="bamfile" format="bam,cram" type="data" label="BAM file"/>
87+
<param argument="--BED" type="boolean" label="Output in BEDPE format?" help="Instead of producing BAM files, write output in BEDPE format (as defined by MACS2). Note that only reads/fragments passing filtering criterion are written in BEDPE format."/>
9288
<param argument="--shift" type="text" label="Amount to shift fragments" value=""
9389
help="Shift the left and right end of a fragment. A positive
9490
value shift an end to the right (on the + strand) and
@@ -101,22 +97,21 @@
10197
right, respectively. Consequently, it is possible to
10298
take strand into consideration for strand-specific
10399
protocols. Note that only properly paired reads are considered."/>
104-
<param argument="--ATACshift" type="boolean" label="Shift fragment ends as appropriate for ATAC-seq" />
105-
<param argument="filterRNAstrand" type="select" label="Only include reads originating from fragments from the forward or reverse strand."
100+
<param argument="--ATACshift" type="boolean" label="Shift fragment ends as appropriate for ATAC-seq"/>
101+
<param argument="filterRNAstrand" type="select" optional="true" label="Only include reads originating from fragments from the forward or reverse strand."
106102
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.
107103
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.">
108-
<option value="no" selected="true">no</option>
109104
<option value="forward">forward</option>
110105
<option value="reverse">reverse</option>
111106
</param>
112107

113-
<expand macro="ignoreDuplicates" />
114-
<expand macro="minMappingQuality" />
115-
<expand macro="samFlags" />
116-
<expand macro="fragLength" />
117-
<expand macro="blacklist" />
118-
<param argument="--filterMetrics" type="boolean" label="Save the total number of reads seen and remaining after filtering to a text file?" help="" />
119-
<param argument="--filteredOutReads" type="boolean" label="Save alignments NOT passing the filtering criteria?" help="" />
108+
<expand macro="ignoreDuplicates"/>
109+
<expand macro="minMappingQuality"/>
110+
<expand macro="samFlags"/>
111+
<expand macro="fragLength"/>
112+
<expand macro="blacklist"/>
113+
<param argument="--filterMetrics" type="boolean" label="Save the total number of reads seen and remaining after filtering to a text file?"/>
114+
<param argument="--filteredOutReads" type="boolean" label="Save alignments NOT passing the filtering criteria?"/>
120115
</inputs>
121116
<outputs>
122117
<data format="tabular" name="filterMetricsFile" label="${tool.name} on ${on_string}: filtering metrics">
@@ -132,34 +127,33 @@
132127
</data>
133128
</outputs>
134129
<tests>
135-
<test>
136-
<param name="bamfile" value="paired_chr2L.bam" ftype="bam" />
137-
<param name="minMappingQuality" value="10" />
138-
<param name="filterMetrics" value="True" />
139-
<output name="outFile" file="alignmentSieve.bam" ftype="bam" lines_diff="1" />
140-
<output name="filterMetricsFile" file="alignmentSieve.txt" ftype="tabular" />
130+
<test expect_num_outputs="2">
131+
<param name="bamfile" value="paired_chr2L.bam" ftype="bam"/>
132+
<param name="minMappingQuality" value="10"/>
133+
<param name="filterMetrics" value="True"/>
134+
<output name="outFile" file="alignmentSieve.bam" ftype="bam" lines_diff="1"/>
135+
<output name="filterMetricsFile" file="alignmentSieve.txt" ftype="tabular"/>
141136
</test>
142-
<test>
143-
<param name="bamfile" value="paired_chr2L.bam" ftype="bam" />
144-
<param name="minMappingQuality" value="10" />
145-
<param name="BED" value="yes" />
146-
<param name="shift" value="1 -2 3 -4" />
147-
<output name="outFile" file="alignmentSieve.bed" ftype="bed" />
137+
<test expect_num_outputs="1">
138+
<param name="bamfile" value="paired_chr2L.bam" ftype="bam"/>
139+
<param name="minMappingQuality" value="10"/>
140+
<param name="BED" value="yes"/>
141+
<param name="shift" value="1 -2 3 -4"/>
142+
<output name="outFile" file="alignmentSieve.bed" ftype="bed"/>
148143
</test>
149-
<test>
150-
<param name="bamfile" value="paired_chr2L.bam" ftype="bam" />
151-
<param name="minMappingQuality" value="10" />
152-
<param name="shift" value="1 -2 3 -4" />
153-
<output name="outFile" file="alignmentSieve2.bam" ftype="bam" lines_diff="2" />
144+
<test expect_num_outputs="1">
145+
<param name="bamfile" value="paired_chr2L.bam" ftype="bam"/>
146+
<param name="minMappingQuality" value="10"/>
147+
<param name="shift" value="1 -2 3 -4"/>
148+
<output name="outFile" file="alignmentSieve2.bam" ftype="bam" lines_diff="2"/>
154149
</test>
155-
<test>
156-
<param name="bamfile" value="paired_chr2L.cram" ftype="cram" />
157-
<param name="minMappingQuality" value="10" />
158-
<param name="shift" value="1 -2 3 -4" />
159-
<output name="outFile" file="alignmentSieve3.bam" ftype="bam" lines_diff="2" />
150+
<test expect_num_outputs="1">
151+
<param name="bamfile" value="paired_chr2L.cram" ftype="cram"/>
152+
<param name="minMappingQuality" value="10"/>
153+
<param name="shift" value="1 -2 3 -4"/>
154+
<output name="outFile" file="alignmentSieve3.bam" ftype="bam" lines_diff="2"/>
160155
</test>
161156
</tests>
162-
163157
<help>
164158
<![CDATA[
165159
@@ -212,5 +206,5 @@ As can be seen, such fragments are considered to be on the ``-`` strand, so nega
212206
@REFERENCES@
213207
]]>
214208
</help>
215-
<expand macro="citations" />
209+
<expand macro="citations"/>
216210
</tool>

galaxy/wrapper/bamCompare.xml

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<token name="@BINARY@">bamCompare</token>
55
<import>deepTools_macros.xml</import>
66
</macros>
7-
<expand macro="requirements" />
7+
<expand macro="requirements"/>
88
<command>
99
<![CDATA[
1010
ln -s '$bamFile1' one.bam &&
@@ -74,16 +74,12 @@
7474
]]>
7575
</command>
7676
<inputs>
77-
<param argument="--bamFile1" format="bam,cram" type="data" label="First BAM/CRAM file (e.g. treated sample)"
78-
help=""/>
79-
<param argument="--bamFile2" format="bam,cram" type="data" label="Second BAM/CRAM file (e.g. control sample)"
80-
help=""/>
81-
77+
<param argument="--bamFile1" format="bam,cram" type="data" label="First BAM/CRAM file (e.g. treated sample)"/>
78+
<param argument="--bamFile2" format="bam,cram" type="data" label="Second BAM/CRAM file (e.g. control sample)"/>
8279
<param argument="--binSize" type="integer" value="50" min="1"
8380
label="Bin size in bases"
8481
help="The genome will be divided into bins of the specified size. For each bin, the overlapping number of fragments (or reads) will be reported.
8582
If only half a fragment overlaps then this fraction will be reported."/>
86-
8783
<conditional name="scaling">
8884
<param name="method" type="select"
8985
label="Method to use for scaling the largest sample to the smallest">
@@ -95,14 +91,13 @@
9591
<when value="SES">
9692
<param argument="--sampleLength" type="integer" value="1000" min="10"
9793
label="Length in bases used to sample the genome and compute the size or scaling factors."
98-
help="The default is fine. Only change it if you know what you are doing." />
94+
help="The default is fine. Only change it if you know what you are doing."/>
9995
<param argument="--numberOfSamples" type="integer" value="100000" min="0"
100-
label="Number of samplings taken from the genome to compute the scaling factors"
101-
help="" />
96+
label="Number of samplings taken from the genome to compute the scaling factors"/>
10297
</when>
103-
<when value="readCount" />
98+
<when value="readCount"/>
10499
<when value="own">
105-
<expand macro="scaleFactors" />
100+
<expand macro="scaleFactors"/>
106101
</when>
107102
<when value="None">
108103
<param name="type" type="select" label="Normalization method" >
@@ -132,78 +127,78 @@
132127
<option value="second">Returns the scaled value of the second BAM file</option>
133128
</param>
134129
<when value="log2">
135-
<expand macro="pseudocount" />
130+
<expand macro="pseudocount"/>
136131
</when>
137132
<when value="ratio">
138-
<expand macro="pseudocount" />
133+
<expand macro="pseudocount"/>
139134
</when>
140-
<when value="add" />
141-
<when value="subtract" />
142-
<when value="mean" />
143-
<when value="first" />
144-
<when value="second" />
135+
<when value="add"/>
136+
<when value="subtract"/>
137+
<when value="mean"/>
138+
<when value="first"/>
139+
<when value="second"/>
145140
<when value="reciprocal_ratio">
146-
<expand macro="pseudocount" />
141+
<expand macro="pseudocount"/>
147142
</when>
148143
</conditional>
149144

150-
<expand macro="exactScaling" />
145+
<expand macro="exactScaling"/>
151146
<param name="outFileFormat" type="select" label="Coverage file format">
152147
<option value="bigwig" selected="true">bigwig</option>
153148
<option value="bedgraph">bedgraph</option>
154149
</param>
155-
<expand macro="region_limit_operation" />
150+
<expand macro="region_limit_operation"/>
156151
<conditional name="advancedOpt">
157152
<param name="showAdvancedOpt" type="select" label="Show advanced options" >
158153
<option value="no" selected="true">no</option>
159154
<option value="yes">yes</option>
160155
</param>
161-
<when value="no" />
156+
<when value="no"/>
162157
<when value="yes">
163-
<expand macro="smoothLength" />
164-
<expand macro="read_processing_options" />
158+
<expand macro="smoothLength"/>
159+
<expand macro="read_processing_options"/>
165160

166-
<expand macro="skipNAs" />
167-
<expand macro="skipZeroOverZero" />
161+
<expand macro="skipNAs"/>
162+
<expand macro="skipZeroOverZero"/>
168163

169164
<param argument="--ignoreForNormalization" type="text" value="" size="50"
170165
label="regions that should be excluded for calculating the scaling factor"
171166
help="Sometimes it makes sense to exclude certain regions when calculating the scaling factor.
172167
For example, if you know of copy number variations between samples then you may want to exclude these.
173168
Another typical example is the difference in chromosome X copies between males and females in many species.
174-
Example inputs are chrX,chrY,chr3 or chr10:12220-128932" />
175-
<expand macro="blacklist" />
169+
Example inputs are chrX,chrY,chr3 or chr10:12220-128932"/>
170+
<expand macro="blacklist"/>
176171
</when>
177172
</conditional>
178173
</inputs>
179174
<outputs>
180175
<data format="bigwig" name="outFileName">
181176
<change_format>
182-
<when input="outFileFormat" value="bigwig" format="bigwig" />
183-
<when input="outFileFormat" value="bedgraph" format="bedgraph" />
177+
<when input="outFileFormat" value="bigwig" format="bigwig"/>
178+
<when input="outFileFormat" value="bedgraph" format="bedgraph"/>
184179
</change_format>
185180
</data>
186181
</outputs>
187182
<tests>
188-
<test>
189-
<param name="bamFile1" value="bowtie2 test1.bam" ftype="bam" />
190-
<param name="bamFile2" value="bowtie2 test1.bam" ftype="bam" />
191-
<param name="showAdvancedOpt" value="no" />
192-
<param name="outFileFormat" value="bigwig" />
193-
<param name="outFileFormat" value="bedgraph" />
194-
<param name="binSize" value="5" />
195-
<param name="type" value="ratio" />
196-
<output name="outFileName" file="bamCompare_result1.bg" ftype="bedgraph" />
183+
<test expect_num_outputs="1">
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="outFileFormat" value="bedgraph"/>
189+
<param name="binSize" value="5"/>
190+
<param name="type" value="ratio"/>
191+
<output name="outFileName" file="bamCompare_result1.bg" ftype="bedgraph"/>
197192
</test>
198-
<test>
199-
<param name="bamFile1" value="bowtie2 test1.bam" ftype="bam" />
200-
<param name="bamFile2" value="bowtie2 test1.bam" ftype="bam" />
201-
<param name="showAdvancedOpt" value="yes" />
202-
<param name="outFileFormat" value="bigwig" />
203-
<param name="outFileFormat" value="bigwig" />
204-
<param name="binSize" value="10" />
205-
<param name="type" value="ratio" />
206-
<output name="outFileName" file="bamCompare_result2.bw" ftype="bigwig" />
193+
<test expect_num_outputs="1">
194+
<param name="bamFile1" value="bowtie2 test1.bam" ftype="bam"/>
195+
<param name="bamFile2" value="bowtie2 test1.bam" ftype="bam"/>
196+
<param name="showAdvancedOpt" value="yes"/>
197+
<param name="outFileFormat" value="bigwig"/>
198+
<param name="outFileFormat" value="bigwig"/>
199+
<param name="binSize" value="10"/>
200+
<param name="type" value="ratio"/>
201+
<output name="outFileName" file="bamCompare_result2.bw" ftype="bigwig"/>
207202
</test>
208203
</tests>
209204
<help>
@@ -248,5 +243,5 @@ Like BAM files, bigWig files are compressed, binary files. If you would like to
248243
@REFERENCES@
249244
]]>
250245
</help>
251-
<expand macro="citations" />
246+
<expand macro="citations"/>
252247
</tool>

0 commit comments

Comments
 (0)