annotate intersectBed.xml @ 17:a2d4c30ba2f9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
author iuc
date Sun, 21 Jun 2015 22:49:46 -0400
parents 0d3aa592ce27
children 5efc48568d8d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
a2d4c30ba2f9 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents: 8
diff changeset
1 <tool id="bedtools_intersectbed" name="Intersect intervals" version="@WRAPPER_VERSION@.0">
a2d4c30ba2f9 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents: 8
diff changeset
2 <description>find overlapping intervals in various ways</description>
8
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
3 <macros>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
4 <import>macros.xml</import>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
5 </macros>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
6 <expand macro="requirements" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
7 <expand macro="stdio" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
8 <command>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
9 <![CDATA[
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
10 #set inputBs = '" "'.join( [ str( $file ) for $file in $inputB ] )
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
11 #set modes = ' '.join( str($overlap_mode).split(',') )
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
12
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
13 bedtools intersect
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
14 #if $inputA.ext == "bam":
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
15 -abam "${inputA}"
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
16 #else:
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
17 -a "${inputA}"
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
18 #end if
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
19
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
20 -b "${inputBs}"
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
21 $split
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
22 $strand
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
23 #if str($fraction) != "None" and str($fraction):
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
24 -f "${fraction}"
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
25 #end if
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
26 $reciprocal
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
27 $invert
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
28 $once
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
29 $header
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
30 $modes
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
31 > "${output}"
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
32 ]]>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
33 </command>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
34 <inputs>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
35 <param format="bed,bam,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF/BAM file"/>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
36 <param format="bed,bam,gff,vcf,gff3" name="inputB" type="data" multiple="True" label="One or more BAM/BED/GFF/VCF file(s)"/>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
37 <expand macro="strand2" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
38 <param name="overlap_mode" type="select" multiple="True" label="What should be written to the output file?">
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
39 <option value="-wa" selected="True">Write the original entry in A for each overlap (-wa)</option>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
40 <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 (-wb)</option>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
41 <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 (-wo)</option>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
42 <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 (-wao)</option>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
43 <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 (-loj)</option>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
44 </param>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
45
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
46 <expand macro="split" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
47 <!-- -f -->
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
48 <param name="fraction" type="text"
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
49 label="Minimum overlap required as a fraction of the BAM alignment"
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
50 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)"/>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
51 <!-- -r -->
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
52 <expand macro="reciprocal" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
53 <!-- -v -->
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
54 <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue=""
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
55 label="Report only those alignments that **do not** overlap the BED file"
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
56 help="(-v)"/>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
57 <!-- -u -->
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
58 <param name="once" type="boolean" checked="false" truevalue="-u" falsevalue=""
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
59 label="Write the original A entry _once_ if _any_ overlaps found in B."
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
60 help="Just report the fact >=1 hit was found. (-u)" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
61 <!-- -c -->
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
62 <param name="count" type="boolean" checked="false" truevalue="-c" falsevalue=""
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
63 label="For each entry in A, report the number of overlaps with B."
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
64 help="Reports 0 for A entries that have no overlap with B. (-c)" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
65 <expand macro="print_header" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
66 </inputs>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
67 <outputs>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
68 <data format_source="inputA" name="output" metadata_source="inputA"/>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
69 </outputs>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
70 <tests>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
71 <test>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
72 <param name="inputA" value="intersectBed1.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
73 <param name="inputB" value="intersectBed2.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
74 <param name="overlap_mode" value="-wa" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
75 <param name="split" value="False" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
76 <output name="output" file="intersectBed_result1.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
77 </test>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
78 <test>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
79 <param name="inputA" value="intersectBed1.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
80 <param name="inputB" value="intersectBed2.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
81 <param name="overlap_mode" value="-wa,-wb" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
82 <param name="split" value="False" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
83 <output name="output" file="intersectBed_result2.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
84 </test>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
85 <test>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
86 <param name="inputA" value="intersectBed1.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
87 <param name="inputB" value="intersectBed2.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
88 <param name="invert" value="True" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
89 <param name="split" value="False" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
90 <output name="output" file="intersectBed_result3.bed" ftype="bed" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
91 </test>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
92 </tests>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
93 <help>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
94 <![CDATA[
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
95 **What it does**
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
96
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
97 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.
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
98
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
99 .. image:: $PATH_TO_IMAGES/intersect-glyph.png
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
100
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
101 .. class:: infomark
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
102
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
103 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.
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
104
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
105 .. class:: infomark
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
106
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
107 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.
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
108
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
109 @REFERENCES@
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
110 ]]>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
111 </help>
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
112 <expand macro="citations" />
0d3aa592ce27 Uploaded
iuc
parents:
diff changeset
113 </tool>