Repository 'probecoverage'
hg clone https://toolshed.g2.bx.psu.edu/repos/artbio/probecoverage

Changeset 3:4f744d3aaf0b (2017-09-24)
Previous changeset 2:35d2db3753d9 (2017-09-24) Next changeset 4:daec4df60281 (2017-09-24)
Commit message:
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/probecoverage commit 8159fa0b4667a953c05aca50d412c33e619b5080
modified:
probecoverage.r
probecoverage.xml
test-data/graph_pysam.pdf
b
diff -r 35d2db3753d9 -r 4f744d3aaf0b probecoverage.r
--- a/probecoverage.r Sun Sep 24 13:34:16 2017 -0400
+++ b/probecoverage.r Sun Sep 24 14:47:11 2017 -0400
[
@@ -12,6 +12,7 @@
     make_option("--xlab", type = "character", help="X-axis legend"),
     make_option("--ylab", type = "character", help="Y-axis legend"),
     make_option("--sample", type = "character", help="a space separated of sample labels"),
+    make_option("--method", type = "character", help="bedtools or pysam"),
     make_option(c("-o", "--output"), type = "character", help="path to the pdf plot")
     )
  
@@ -30,8 +31,11 @@
 }
 
 ## function
-
-cumul <- function(x,y) sum(Table[,y]/(Table$end-Table$start) > x)/length(Table$chromosome)
+if (args$method == 'bedtools') {
+    cumul <- function(x,y) sum(Table[,y]/(Table$end-Table$start) > x)/length(Table$chromosome)
+    } else {
+    cumul <- function(x,y) sum(Table[,y] > x)/length(Table$chromosome)
+    }
 scaleFUN <- function(x) sprintf("%.3f", x)
 
 ## end of function
b
diff -r 35d2db3753d9 -r 4f744d3aaf0b probecoverage.xml
--- a/probecoverage.xml Sun Sep 24 13:34:16 2017 -0400
+++ b/probecoverage.xml Sun Sep 24 14:47:11 2017 -0400
b
@@ -1,4 +1,4 @@
-<tool id="probecoverage" name="Probe Coverage" version="0.3.0">
+<tool id="probecoverage" name="Probe Coverage" version="0.4.0">
   <description></description>
   <requirements>
         <requirement type="package" version="1.4.1">samtools</requirement>
@@ -26,6 +26,7 @@
               #end for
           -bed '$bed' > $coverage_dataframe &&
       Rscript '$__tool_directory__'/probecoverage.r
+          --method '$method'
           --input '$coverage_dataframe' 
           --title 'Probe coverage depth (cumulative distribution)'
           --xlab
b
diff -r 35d2db3753d9 -r 4f744d3aaf0b test-data/graph_pysam.pdf
b
Binary file test-data/graph_pysam.pdf has changed