view bedtools-galaxy/genomeCoverageBed_bedgraph.xml @ 0:fa875e3c66c3 draft

Uploaded
author bgruening
date Wed, 02 Jan 2013 18:27:11 -0500
parents
children 3b3e7774f51a
line wrap: on
line source

<tool id="bedtools_genomecoveragebed_bedgraph" name="Create a BedGraph of genome coverage" version="0.2.0">

    <description>
    </description>
    
    <requirements>
        <requirement type="package" version="2.17.0_5e4507c54355a4a38c6d3e7497a2836a123c6655">bedtools</requirement>
    </requirements>

    <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="text" 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>
    <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).

.. class:: warningmark

This tool requires that `bedtools`__ has been installed on your system.

-----

**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


This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__

        .. __: http://code.google.com/p/bedtools/
        .. __: http://code.google.com/p/bedtools/
        .. __: http://cphg.virginia.edu/quinlan/
        .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short
</help>
</tool>