0
|
1 <tool id="bedtools_bamtobed" name="Convert from BAM to BED" version="0.1.0">
|
|
2
|
|
3 <description>
|
|
4 </description>
|
|
5
|
|
6 <requirements>
|
|
7 <requirement type="binary">bamToBed</requirement>
|
|
8 </requirements>
|
|
9
|
|
10 <command>
|
|
11 bamToBed $option $ed_score -i '$input' > '$output'
|
|
12 #if str($tag):
|
|
13 -tag $tag
|
|
14 #end if
|
|
15 </command>
|
|
16
|
|
17 <inputs>
|
|
18 <param format="bam" name="input" type="data" label="Convert the following BAM file to BED"/>
|
|
19 <param name="option" type="select" label="What type of BED output would you like">
|
|
20 <option value="">Create a 6-column BED file.</option>
|
|
21 <option value="-bed12">Create a full, 12-column "blocked" BED file.</option>
|
|
22 <option value="-bedpe">Create a paired-end, BEDPE format.</option>
|
|
23 </param>
|
|
24 <param name="split" type="boolean" label="Report spliced BAM alignments as separate BED entries" truevalue="-split" falsevalue="" checked="false"/>
|
|
25 <param name="ed_score" type="boolean" label="Use alignment's edit-distance for BED score" truevalue="-ed" falsevalue="" checked="false"/>
|
|
26 <param name="tag" type="text" optional="true" label="Use other NUMERIC BAM alignment tag as the BED score"/>
|
|
27 </inputs>
|
|
28
|
|
29 <outputs>
|
|
30 <data format="bed" name="output" metadata_source="input" label="${input.name} (as BED)"/>
|
|
31 </outputs>
|
|
32
|
|
33 <help>
|
|
34
|
|
35 **What it does**
|
|
36
|
|
37 This tool converts a BAM file to a BED file. The end coordinate is computed
|
|
38 by inspecting the CIGAR string. The QNAME for the alignment is used as the
|
|
39 BED name field and, by default, the MAPQ is used as the BED score.
|
|
40
|
|
41 .. class:: infomark
|
|
42
|
|
43 The "Report spliced BAM alignment..." option breaks BAM alignments with the "N" (splice) operator into distinct BED entries. For example, using this option on a CIGAR such as 50M1000N50M would, by default, produce a single BED record that spans 1100bp. However, using this option, it would create two separate BED records that are each 50bp in size and are separated by 1000bp (the size of the N operation). This is important for RNA-seq and structural variation experiments.
|
|
44
|
|
45
|
|
46 .. class:: warningmark
|
|
47
|
|
48 If using a custom BAM alignment TAG as the BED score, note that this must be a numeric tag (e.g., type "i" as in NM:i:0).
|
|
49
|
|
50 .. class:: warningmark
|
|
51
|
|
52 If creating a BEDPE output (see output formatting options), the BAM file should be sorted by query name.
|
|
53
|
|
54 .. class:: warningmark
|
|
55
|
|
56 This tool requires that `bedtools`__ has been installed on your system.
|
|
57
|
|
58 ------
|
|
59
|
|
60 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.`__
|
|
61
|
|
62 .. __: http://code.google.com/p/bedtools/
|
|
63 .. __: http://code.google.com/p/bedtools/
|
|
64 .. __: http://cphg.virginia.edu/quinlan/
|
|
65 .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short
|
|
66
|
|
67
|
|
68
|
|
69 </help>
|
|
70 </tool>
|