diff probecoverage.xml @ 0:3c0451ca266e draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/probecoverage commit 62a8b073b9ac98b0231641e5266768e7f8b80b89"
author artbio
date Tue, 07 Jan 2020 11:08:31 +0000
parents
children 9eb4a7000c1e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/probecoverage.xml	Tue Jan 07 11:08:31 2020 +0000
@@ -0,0 +1,106 @@
+<tool id="probecoverage" name="Probe Coverage" version="0.6.0">
+  <description></description>
+  <requirements>
+        <requirement type="package" version="1.10=h9402c20_2">samtools</requirement>
+        <requirement type="package" version="2.29.2=hc088bd4_0">bedtools</requirement>
+        <requirement type="package" version="1.6.4=r36h6115d3f_0">r-optparse</requirement>
+        <requirement type="package" version="3.2.1=r36h6115d3f_0">r-ggplot2</requirement>
+        <requirement type="package" version="1.17.3=py37h95a1406_0">numpy</requirement>
+        <requirement type="package" version="0.15.3=py37hbcae180_3">pysam</requirement>
+  </requirements>
+  <stdio>
+      <exit_code range="1:" level="fatal" description="Tool exception" />
+  </stdio>
+  <command detect_errors="exit_code"><![CDATA[
+      #for $file in $inputs
+          samtools index '$file' &&
+      #end for
+      #if $method == 'pysam':
+          python $__tool_directory__/multicov.py
+      #else:
+          bedtools multicov
+      #end if
+          -bams
+              #for $file in $inputs
+                  '$file'
+              #end for
+          -bed '$bed' > $coverage_dataframe &&
+      Rscript '$__tool_directory__'/probecoverage.r
+          --method '$method'
+          --input '$coverage_dataframe' 
+          --title 'Probe coverage depth (cumulative distribution)'
+          --xlab
+          #if $method == 'pysam':
+              'Depth (pysam method)'
+          #else:
+              'Depth (bedtools muticov method)'
+          #end if
+          --ylab 'Fraction of covered regions with coverage >= Depth'
+          --output '$distribution'
+          --sample "
+              #for $file in $inputs 
+                  $file.element_identifier,
+              #end for
+              "
+              
+  ]]></command>
+<inputs>
+    <param name="inputs" type="data" format="bam" label="Select multiple Bam alignments to parse" multiple="True"/>
+    <param name="bed" type="data" format="bed" label="Select a bed file describing the genomic regions to analyze" />
+    <param name="method" type="boolean" falsevalue="bedtools" checked="false" truevalue="pysam"
+           help="coverage is computed using bedtools multicov (default) or pysam module"
+           label="Compute coverage with pysam (bedtools by default)" />
+</inputs>
+
+ <outputs>
+   <data format="tabular" name="coverage_dataframe" label="coverage table" />
+   <data format="pdf" name="distribution" label="Cumulative distribution of region coverages" />
+</outputs>
+
+    <tests>
+        <test>
+            <param name="inputs" value="sample1,sample2,sample3" ftype="bam"/>
+            <param name="bed" value="probes.bed" ftype="bed"/>
+            <param name="method" value="bedtools" />
+            <output file="coverage.tab" name="coverage_dataframe" />
+            <output file="graph.pdf" name="distribution" />
+        </test>
+        <test>
+            <param name="inputs" value="sample1,sample2,sample3" ftype="bam"/>
+            <param name="bed" value="probes.bed" ftype="bed"/>
+            <param name="method" value="pysam" />
+            <output file="coverage_pysam.tab" name="coverage_dataframe" />
+            <output file="graph_pysam.pdf" name="distribution" />
+        </test>
+    </tests>
+
+
+<help>
+
+**What it does**
+
+Generates counts of alignments from multiple position-sorted BAM files
+that overlap intervals in a BED file.
+
+Shows data as a cumulative plot of numbers of regions with coverage > x.	
+
+**Inputs**
+
+bam alignment files that must be
+
+  - sorted
+  - mapped to the same reference
+
+**Output**
+
+A data frame of computed counts
+
+A pdf file generated by R
+
+</help>
+
+<citations>
+    <citation type="doi">10.1093/bioinformatics/btq033</citation>
+</citations>
+</tool>
+