annotate bedtools-galaxy/intersectBed.xml @ 0:fa875e3c66c3 draft

Uploaded
author bgruening
date Wed, 02 Jan 2013 18:27:11 -0500
parents
children 3b3e7774f51a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
1 <tool id="bedtools_intersectbed" name="Intersect interval files" version="0.2.0">
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
2 <description>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
3 </description>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
4 <requirements>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
5 <requirement type="package" version="2.17.0_5e4507c54355a4a38c6d3e7497a2836a123c6655">bedtools</requirement>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
6 </requirements>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
7
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
8 <command>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
9 intersectBed
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
10 #if $inputA.ext == "bam":
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
11 -abam $inputA
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
12 #else:
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
13 -a $inputA
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
14 #end if
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
15
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
16 -b $inputB
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
17 $split
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
18 $strand
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
19 #if str($fraction):
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
20 -f $fraction
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
21 #end if
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
22 $reciprocal
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
23 $invert
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
24 $once
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
25 $header
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
26 $overlap_mode
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
27 &gt; $output
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
28 </command>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
29
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
30 <inputs>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
31 <param format="bed,bam" name="inputA" type="data" label="BED or BAM file"/>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
32 <param format="bed" name="inputB" type="data" label="overlap intervals in this BED file?"/>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
33
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
34 <param name="strand" type="select" label="Calculate coverage based on">
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
35 <option value="">Overlaps on either strand</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
36 <option value="-s">Only overlaps occurring on the **same** strand.</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
37 <option value="-S">Only overlaps occurring on the **opposite** strand.</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
38 </param>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
39
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
40 <param name="overlap_mode" type="select" label="Calculate coverage based on">
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
41 <option value="">Overlaps on either strand</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
42 <option value="-wa">Write the original entry in A for each overlap.</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
43 <option value="-wb">Write the original entry in B for each overlap. Useful for knowing what A overlaps. Restricted by the fraction- and reciprocal option.</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
44 <option value="-wo">Write the original A and B entries plus the number of base pairs of overlap between the two features. Only A features with overlap are reported. Restricted by the fraction- and reciprocal option.</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
45 <option value="-wao">Write the original A and B entries plus the number of base pairs of overlap between the two features. However, A features w/o overlap are also reported with a NULL B feature and overlap = 0. Restricted by the fraction- and reciprocal option.</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
46 <option value="-loj">Perform a "left outer join". That is, for each feature in A report each overlap with B. If no overlaps are found, report a NULL feature for B.</option>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
47 </param>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
48
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
49 <param name="split" type="boolean" checked="true" 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." />
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
50 <!-- -f -->
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
51 <param name="fraction" type="text" optional="true" label="Minimum overlap required as a fraction of the BAM alignment" help="Alignments are only retained if the overlap with the an interval in the BED file comprises at least this fraction of the BAM alignment's length. For example, to require that the overlap affects 50% of the BAM alignment, use 0.50"/>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
52 <!-- -r -->
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
53 <param name="reciprocal" type="boolean" checked="false" truevalue="-r" falsevalue="" label="Require reciprocal overlap." help="If set, the overlap between the BAM alignment and the BED interval must affect the above fraction of both the alignment and the BED interval." />
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
54 <!-- -v -->
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
55 <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue="" label="Report only those alignments that **do not** overlap the BED file."/>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
56 <!-- -u -->
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
57 <param name="once" type="boolean" checked="false" truevalue="-u" falsevalue="" label="Write the original A entry _once_ if _any_ overlaps found in B." help="Just report the fact >=1 hit was found." />
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
58 <!-- -c -->
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
59 <param name="count" type="boolean" checked="false" truevalue="-c" falsevalue="" label="For each entry in A, report the number of overlaps with B." help="Reports 0 for A entries that have no overlap with B." />
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
60 <!-- -sorted Use the "chromsweep" algorithm for sorted (-k1,1 -k2,2n) input -->
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
61
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
62 <!-- header -->
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
63 <param name="header" type="boolean" checked="false" truevalue="-header" falsevalue="" label="Print the header from the A file prior to results." />
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
64
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
65
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
66 </inputs>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
67
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
68 <outputs>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
69 <data format_source="inputA" name="output" metadata_source="inputA" label="Intersection of ${inputA.name} and ${inputB.name}"/>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
70 </outputs>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
71
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
72 <help>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
73
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
74 **What it does**
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
75
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
76 This tool creates a new BAM alignment file based on alignments that overlap (or optionally, those that do not overlap) intervals in another BED file. Example usage would be to cull a BAM file from an exome capture experiment to include on the "on-target" alignments.
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
77
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
78 .. class:: infomark
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
79
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
80 Note that each BAM alignment is treated individually. Therefore, if one end of a paired-end alignment overlaps an interval in the BED file, yet the other end does not, the output file will only include the overlapping end.
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
81
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
82 .. class:: infomark
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
83
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
84 Note that a BAM alignment will be sent to the output file **once** even if it overlaps more than one interval in the BED file.
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
85
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
86 .. class:: warningmark
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
87
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
88 This tool requires that `bedtools`__ has been installed on your system.
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
89
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
90 ------
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
91
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
92 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.`__
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
93
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
94 .. __: http://code.google.com/p/bedtools/
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
95 .. __: http://code.google.com/p/bedtools/
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
96 .. __: http://cphg.virginia.edu/quinlan/
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
97 .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
98
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
99 </help>
fa875e3c66c3 Uploaded
bgruening
parents:
diff changeset
100 </tool>