Repository 'deeptools_plot_coverage'
hg clone https://toolshed.g2.bx.psu.edu/repos/bgruening/deeptools_plot_coverage

Changeset 25:4e12ea27f788 (2019-05-29)
Previous changeset 24:3b9d990a0a0e (2019-04-02) Next changeset 26:56bce3c82278 (2020-01-25)
Commit message:
planemo upload for repository https://github.com/deeptools/deepTools/tree/master/galaxy/wrapper/ commit 9092b83f7ab4d7d57409f0cd9046d573209e9a83
modified:
deepTools_macros.xml
plotCoverage.xml
test-data/plotCoverage_result1.png
added:
test-data/plotCoverage.metrics
b
diff -r 3b9d990a0a0e -r 4e12ea27f788 deepTools_macros.xml
--- a/deepTools_macros.xml Tue Apr 02 08:13:59 2019 -0400
+++ b/deepTools_macros.xml Wed May 29 09:43:57 2019 -0400
b
@@ -1,10 +1,10 @@
 <macros>
 
     <token name="@THREADS@">--numberOfProcessors "\${GALAXY_SLOTS:-4}"</token>
-    <token name="@WRAPPER_VERSION@">3.2.1.0</token>
+    <token name="@WRAPPER_VERSION@">3.3.0.0</token>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="3.2.1">deeptools</requirement>
+            <requirement type="package" version="3.3.0">deeptools</requirement>
             <requirement type="package" version="1.9">samtools</requirement>
         </requirements>
         <expand macro="stdio" />
b
diff -r 3b9d990a0a0e -r 4e12ea27f788 plotCoverage.xml
--- a/plotCoverage.xml Tue Apr 02 08:13:59 2019 -0400
+++ b/plotCoverage.xml Wed May 29 09:43:57 2019 -0400
[
@@ -25,6 +25,23 @@
                 --outRawCounts '$outFileRawCounts'
             #end if
 
+            #if ' '.join(map(str, $BED)) != 'None':
+                #set bedFileLList=[]
+                #for $f in $BED:
+                    #silent $bedFileList.append("'%s'" % $f)
+                #end for
+                #if $bedFileList != ["'None'"]:
+                    --BED #echo ' '.join($bedFileList)#
+                #end if
+            #end if
+
+            #if $coverageOpt.showCoverageOpt == "yes":
+                --outCoverageMetrics '$outFileCoverageMetrics'
+                #for $t in $coverageOpt.thresholds:
+                    -ct $t.coverageThreshold
+                #end for
+            #end if
+
             #if $advancedOpt.showAdvancedOpt == "yes":
                 --numberOfSamples '$advancedOpt.numberOfSamples'
                 $advancedOpt.skipZeros
@@ -48,11 +65,28 @@
 
         <expand macro="multiple_input_bams" MIN="1"/>
         <expand macro="custom_sample_labels" />
+        <param argument="--BED" type="data" format="bed,gtf" multiple="true" optional="true" min="0"
+            label="Regions of interest"
+            help="Limits the coverage analysis to the regions specified in these files. This overrides --numberOfSamples. It is inadvisable to combine this with saving the raw counts." />
+
+        <conditional name="coverageOpt">
+            <param name="showCoverageOpt" type="select" label="Show coverage metrics options">
+                <option value="no" selected="true">No</option>
+                <option value="yes">Yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param argument="--outCoverageMetrics" type="boolean" label="Save per-threshold coverage metrics?"/>
+                <repeat name="thresholds" title="Coverage Thresholds">
+                    <param argument="--coverageThreshold" type="integer" min="0" label="Coverage Threshold" value="0"/>
+                </repeat>
+            </when>
+        </conditional>
 
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
-                <option value="no" selected="true">no</option>
-                <option value="yes">yes</option>
+                <option value="no" selected="true">No</option>
+                <option value="yes">Yes</option>
             </param>
             <when value="no" />
             <when value="yes">
@@ -78,6 +112,9 @@
         <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
             <filter>outRawCounts is True</filter>
         </data>
+        <data format="tabular" name="outFileCoverageMetrics" label="${tool.name} on ${on_string}: Threshold Metrics">
+            <filter>coverageOpt.outCoverageMetrics is True</filter>
+        </data>
     </outputs>
     <tests>
         <test>
@@ -89,6 +126,18 @@
             <output name="outFileRawCounts" file="plotCoverage_result1.tabular" ftype="tabular" />
             <output name="outFileName" file="plotCoverage_result1.png" ftype="png" compare="sim_size" delta="2400" />
         </test>
+        <test>
+            <param name="bamfiles" value="bowtie2 test1.bam,bowtie2 test1.bam" ftype="bam" />
+            <param name="showAdvancedOpt" value="yes" />
+            <param name="plotTitle" value="Test Title from Galaxy" />
+            <param name="showCoverageOpt" value="yes" />
+            <param name="coverageThreshold" value="0" />
+            <param name="coverageThreshold" value="5" />
+            <param name="coverageThreshold" value="10" />
+            <param name="coverageThreshold" value="20" />
+            <output name="outFileName" file="plotCoverage_result1.png" ftype="png" compare="sim_size" delta="2400" />
+            <output name="outFileCoverageMetrics" file="plotCoverage.metrics" ftype="tabular" />
+        </test>
     </tests>
     <help>
 <![CDATA[
b
diff -r 3b9d990a0a0e -r 4e12ea27f788 test-data/plotCoverage.metrics
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/plotCoverage.metrics Wed May 29 09:43:57 2019 -0400
b
@@ -0,0 +1,9 @@
+Sample Threshold Percent
+bowtie2 test1.bam 0 100.000
+bowtie2 test1.bam 0 100.000
+bowtie2 test1.bam 5  1.509
+bowtie2 test1.bam 5  1.509
+bowtie2 test1.bam 10  1.461
+bowtie2 test1.bam 10  1.461
+bowtie2 test1.bam 20  1.406
+bowtie2 test1.bam 20  1.406
b
diff -r 3b9d990a0a0e -r 4e12ea27f788 test-data/plotCoverage_result1.png
b
Binary file test-data/plotCoverage_result1.png has changed