annotate intersectBed.xml @ 0:4fb5ea02b441 draft

Uploaded
author iuc
date Tue, 15 Jul 2014 14:42:23 -0400
parents
children 7511823bdea1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
1 <tool id="bedtools_intersectbed" name="Intersect interval files" version="@WRAPPER_VERSION@.0">
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
2 <description></description>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
3 <macros>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
4 <import>macros.xml</import>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
5 </macros>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
6 <expand macro="requirements" />
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
7 <expand macro="stdio" />
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
8 <command>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
9 intersectBed
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
10 #if $inputA.ext == "bam":
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
11 -abam $inputA
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
12 #else:
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
13 -a $inputA
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
14 #end if
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
15
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
16 -b $inputB
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
17 $split
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
18 $strand
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
19 #if str($fraction):
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
20 -f $fraction
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
21 #end if
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
22 $reciprocal
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
23 $invert
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
24 $once
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
25 $header
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
26 $overlap_mode
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
27 &gt; $output
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
28 </command>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
29 <inputs>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
30 <param format="bed,bam,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF/BAM file"/>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
31 <param format="bed,gff,vcf,gff3" name="inputB" type="data" label="overlap intervals in this BED file?"/>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
32
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
33 <param name="strand" type="select" label="Calculate the intersection based on strandedness?">
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
34 <option value="" selected="True">Overlaps on either strand</option>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
35 <option value="-s">Only overlaps occurring on the **same** strand.</option>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
36 <option value="-S">Only overlaps occurring on the **opposite** strand.</option>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
37 </param>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
38
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
39 <param name="overlap_mode" type="select" label="What should be written to the output file?">
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
40 <option value="-wa" selected="True">Write the original entry in A for each overlap.</option>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
41 <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>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
42 <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>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
43 <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>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
44 <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>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
45 </param>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
46
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
47 <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." />
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
48 <!-- -f -->
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
49 <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. (-f)"/>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
50 <!-- -r -->
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
51 <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. (-r)" />
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
52 <!-- -v -->
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
53 <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue="" label="Report only those alignments that **do not** overlap the BED file. (-v)"/>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
54 <!-- -u -->
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
55 <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. (-u)" />
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
56 <!-- -c -->
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
57 <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. (-c)" />
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
58 <!-- header -->
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
59 <param name="header" type="boolean" checked="false" truevalue="-header" falsevalue="" label="Print the header from the A file prior to results." />
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
60 <!-- header -->
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
61 <param name="header" type="boolean" checked="false" truevalue="-header" falsevalue="" label="Print the header from the A file prior to results." />
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
62 </inputs>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
63 <outputs>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
64 <data format_source="inputA" name="output" metadata_source="inputA" label="Intersection of ${inputA.name} and ${inputB.name}"/>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
65 </outputs>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
66 <help>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
67
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
68 **What it does**
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
69
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
70 By far, the most common question asked of two sets of genomic features is whether or not any of the features in the two sets “overlap” with one another. This is known as feature intersection. bedtools intersect allows one to screen for overlaps between two sets of genomic features. Moreover, it allows one to have fine control as to how the intersections are reported. bedtools intersect works with both BED/GFF/VCF and BAM files as input.
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
71
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
72 .. image:: $PATH_TO_IMAGES/intersect-glyph.png
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
73
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
74 .. class:: infomark
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
75
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
76 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.
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
77
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
78 .. class:: infomark
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
79
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
80 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.
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
81
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
82 @REFERENCES@
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
83
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
84 </help>
4fb5ea02b441 Uploaded
iuc
parents:
diff changeset
85 </tool>