diff genomeCoverageBed_bedgraph.xml @ 5:b78d20957e7f draft

Uploaded
author bernhardlutz
date Thu, 05 Jun 2014 15:25:18 -0400
parents
children c782e0edc4f1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/genomeCoverageBed_bedgraph.xml	Thu Jun 05 15:25:18 2014 -0400
@@ -0,0 +1,122 @@
+<tool id="bedtools_genomecoveragebed_bedgraph" name="Create a BedGraph of genome coverage" version="0.2.0">
+    <description>
+    </description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <command>
+        genomeCoverageBed
+        #if $input.ext == "bam"
+            -ibam '$input'
+        #else
+            -i '$input'
+            -g ${chromInfo}
+        #end if
+        
+        #if str($scale):
+          -scale $scale
+        #end if
+
+        -bg
+        $zero_regions
+        $split
+        $strand
+        &gt; '$output'
+    </command>
+    <inputs>
+        <param format="bed,bam" name="input" type="data" label="The BAM or BED file from which coverage should be computed">
+              <validator type="unspecified_build" />
+        </param>
+
+        <param name="zero_regions" type="boolean" checked="true" truevalue="-bga" falsevalue="" label="Report regions with zero coverage" help="If set, regions without any coverage will also be reported." />
+
+        <param name="split" type="boolean" checked="false" truevalue="-split" falsevalue="" label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage." help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval's START/END coordinates, and would include introns in the case of RNAseq data." />
+
+        <param name="strand" type="select" label="Calculate coverage based on">
+            <option value="">both strands combined</option>
+            <option value="-strand +">positive strand only</option>
+            <option value="-strand -">negative strand only</option>
+        </param>
+
+        <param name="scale" type="float" optional="true" label="Scale the coverage by a constant factor" help="Each BEDGRAPH coverage value is multiplied by this factor before being reported. Useful for normalizing coverage by, e.g., reads per million (RPM)"/>
+    </inputs>
+    <outputs>
+        <data format="bedgraph" name="output"  metadata_source="input" label="${input.name} (Genome Coverage BedGraph)" />
+    </outputs>
+
+$ cat A.bed
+chr1  10  20
+chr1  20  30
+chr2  0   500
+
+$ cat my.genome
+chr1  1000
+chr2  500
+
+$ bedtools genomecov -i A.bed -g my.genome
+chr1   0  980  1000  0.98
+chr1   1  20   1000  0.02
+chr2   1  500  500   1
+genome 0  980  1500  0.653333
+genome 1  520  1500  0.346667
+
+    <help>
+
+
+**What it does**
+
+This tool calculates the genome-wide coverage of intervals defined in a BAM or BED file and reports them in BedGraph format.
+
+.. class:: warningmark
+
+The input BED or BAM file must be sorted by chromosome name (but doesn't necessarily have to be sorted by start position).
+
+-----
+
+**Example 1**
+
+Input (BED format)-
+Overlapping, un-sorted intervals::
+
+    chr1    140 176
+    chr1    100 130
+    chr1    120 147
+
+
+Output (BedGraph format)-
+Sorted, non-overlapping intervals, with coverage value on the 4th column::
+
+    chr1    100 120 1
+    chr1    120 130 2
+    chr1    130 140 1
+    chr1    140 147 2
+    chr1    147 176 1
+
+-----
+
+**Example 2 - with ZERO-Regions selected (assuming hg19)**
+
+Input (BED format)-
+Overlapping, un-sorted intervals::
+
+    chr1    140 176
+    chr1    100 130
+    chr1    120 147
+
+
+Output (BedGraph format)-
+Sorted, non-overlapping intervals, with coverage value on the 4th column::
+
+    chr1    0 100 0
+    chr1    100 120 1
+    chr1    120 130 2
+    chr1    130 140 1
+    chr1    140 147 2
+    chr1    147 176 1
+    chr1    176 249250621 0
+
+@REFERENCES@
+    </help>
+</tool>