0
|
1 <tool id="bedtools_intersectBed" name="IntersectBed" version="v2.10.0">
|
|
2 <description>Report overlaps between two feature files</description>
|
|
3 <command>bedtools intersect
|
|
4
|
|
5 $invert $count
|
|
6
|
|
7 -f $min_overlap
|
|
8
|
|
9 #if str($typeA.file_typeA)=="bam"
|
|
10 -abam $typeA.fileA -b $typeB.fileB > $outbamfile;
|
|
11 #end if
|
|
12
|
|
13 #if str($typeA.file_typeA)=="bed"
|
|
14 $report.type_report -a $typeA.fileA -b $typeB.fileB > $outbedfile;
|
|
15 #end if
|
|
16
|
|
17 #if str($typeA.file_typeA)=="gff"
|
|
18 $report.type_report -a $typeA.fileA -b $typeB.fileB > $outgfffile;
|
|
19 #end if
|
|
20
|
|
21 #if str($typeA.file_typeA)=="vcf"
|
|
22 $report.type_report -a $typeA.fileA -b $typeB.fileB > $outvcffile;
|
|
23 #end if
|
|
24
|
|
25 </command>
|
|
26 <inputs>
|
|
27
|
|
28 <conditional name="typeA">
|
|
29 <param name="file_typeA" type="select" label="Select the file A type to intersect">
|
|
30 <option value="bed">BED (.bed)</option>
|
|
31 <option value="bam">BAM (.bam)</option>
|
|
32 <option value="vcf">VCF (.vcf)</option>
|
|
33 <option value="gff">GFF (.gff)</option>
|
|
34 </param>
|
|
35 <when value="bam">
|
|
36 <param name="fileA" format="bam" type="data" label="BAM file"/>
|
|
37 </when>
|
|
38 <when value="bed">
|
|
39 <param name="fileA" format="bed" type="data" label="BED file"/>
|
|
40 </when>
|
|
41 <when value="vcf">
|
|
42 <param name="fileA" format="vcf" type="data" label="VCF file"/>
|
|
43 </when>
|
|
44 <when value="gff">
|
|
45 <param name="fileA" format="gff" type="data" label="GFF file"/>
|
|
46 </when>
|
|
47 </conditional>
|
|
48
|
|
49 <conditional name="typeB">
|
|
50 <param name="file_typeB" type="select" label="Select the file B type to intersect">
|
|
51 <option value="bed">BED (.bed)</option>
|
|
52 <option value="vcf">VCF (.vcf)</option>
|
|
53 <option value="gff">GFF (.gff)</option>
|
|
54 </param>
|
|
55 <when value="bed">
|
|
56 <param name="fileB" format="bed" type="data" label="BED file"/>
|
|
57 </when>
|
|
58 <when value="vcf">
|
|
59 <param name="fileB" format="vcf" type="data" label="VCF file"/>
|
|
60 </when>
|
|
61 <when value="gff">
|
|
62 <param name="fileB" format="gff" type="data" label="GFF file"/>
|
|
63 </when>
|
|
64 </conditional>
|
|
65
|
|
66 <conditional name="report">
|
|
67 <param name="type_report" type="select" label="Select the type of report" help="not used if the file A type is BAM">
|
|
68 <option value="">write the base-pair overlap between A and B</option>
|
|
69 <option value="-wa">write the original entry in A for each overlap (-wa)</option>
|
|
70 <!-- <option value="-wb">-wb : write the original entry in B for each overlap</option> -->
|
|
71 <option value="-wo">write the original A and B entries plus the number of base pairs of overlap between the two features (-wo)</option>
|
|
72 <option value="-wao">write the original A and B entries plus the number of base pairs of overlap between the two features (-wao)</option>
|
|
73 </param>
|
|
74 <when value="">
|
|
75 <!-- do nothing here -->
|
|
76 </when>
|
|
77 <when value="-wa">
|
|
78 <!-- do nothing here -->
|
|
79 </when>
|
|
80 <!-- <when value="-wb">
|
|
81 </when> -->
|
|
82 <when value="-wo">
|
|
83 <!-- do nothing here -->
|
|
84 </when>
|
|
85 <when value="-wao">
|
|
86 <!-- do nothing here -->
|
|
87 </when>
|
|
88 </conditional>
|
|
89
|
|
90 <param name="invert" label="Only report those entries in A that have _no overlaps_ with B?" type="boolean" truevalue="-v" falsevalue="" checked="no"/>
|
|
91 <param name="count" label="For each entry in A, report the number of overlaps with B?" type="boolean" truevalue="-c" falsevalue="" checked="no"/>
|
|
92
|
|
93 <param name="min_overlap" type="float" size="10" value="0.05" label="Minimum overlap required as a fraction of A" help="5% by default" />
|
|
94 <param name="file_name" type="text" size="20" value="sample" label="File name (without file extension)"/>
|
|
95 </inputs>
|
|
96
|
|
97 <outputs>
|
|
98 <data format="bam" name="outbamfile" label="${file_name}.bam">
|
|
99 <filter>typeA['file_typeA']=="bam"</filter>
|
|
100 </data>
|
|
101 <data format="bed" name="outbedfile" label="${file_name}.bed">
|
|
102 <filter>typeA['file_typeA']=="bed"</filter>
|
|
103 </data>
|
|
104 <data format="gff" name="outgfffile" label="${file_name}.gff">
|
|
105 <filter>typeA['file_typeA']=="gff"</filter>
|
|
106 </data>
|
|
107 <data format="vcf" name="outvcffile" label="${file_name}.vcf">
|
|
108 <filter>typeA['file_typeA']=="vcf"</filter>
|
|
109 </data>-->
|
|
110 </outputs>
|
|
111
|
|
112 <help>
|
|
113 **What it does**
|
|
114
|
|
115 This tool use the "intersectBed" function of Bedtools to report overlaps between two feature files.
|
|
116
|
|
117 Note: When intersecting SNPs, make sure the coordinate conform to the UCSC format.
|
|
118 That is, the start position for each SNP should be SNP position - 1 and the end position should be SNP position. E.g. chr7 10000001 10000002 rs123464
|
|
119
|
|
120 * Report the base-pair overlap between sequence alignments and genes.
|
|
121 $ intersectBed -a reads.bed -b genes.bed
|
|
122 * Report whether each alignment overlaps one or more genes. If not, the alignment is not reported.
|
|
123 $ intersectBed -a reads.bed -b genes.bed -u
|
|
124 * Report those alignments that overlap NO genes. Like "grep -v"
|
|
125 $ intersectBed -a reads.bed -b genes.bed -v
|
|
126 * Report the number of genes that each alignment overlaps.
|
|
127 $ intersectBed -a reads.bed -b genes.bed -c
|
|
128 * Report the entire, original alignment entry for each overlap with a gene.
|
|
129 $ intersectBed -a reads.bed -b genes.bed -wa
|
|
130 * Report the entire, original alignment and genes entries for each overlap plus the number of base pairs. Only reads features with overlap are reported.
|
|
131 $ intersectBed -a reads.bed -b genes.bed -wo
|
|
132 * Report the entire, original alignment and genes entries for each overlap plus the number of base pairs. However, alignment features w/o overlap are also reported with a NULL gene feature and overlap = 0.
|
|
133 $ intersectBed -a reads.bed -b genes.bed -wao
|
|
134 * Only report an overlap with a repeat if it spans at least 50% of the exon.
|
|
135 $ intersectBed -a exons.bed -b repeatMasker.bed –f 0.50
|
|
136 * Only report an overlap if comprises 50% of the structural variant and 50% of the segmental duplication. Thus, it is reciprocally at least a 50% overlap.
|
|
137 $ intersectBed -a SV.bed -b segmentalDups.bed –f 0.50 -r
|
|
138 * Read BED A from stdin. For example, find genes that overlap LINEs but not SINEs.
|
|
139 $ intersectBed -a genes.bed -b LINES.bed | intersectBed -a stdin -b SINEs.bed -v
|
|
140 * Retain only single-end BAM alignments that overlap exons.
|
|
141 $ intersectBed -abam reads.bam -b exons.bed > reads.touchingExons.bam
|
|
142 * Retain only single-end BAM alignments that do not overlap simple sequence repeats.
|
|
143 $ intersectBed -abam reads.bam -b SSRs.bed -v > reads.noSSRs.bam
|
|
144
|
|
145 -----
|
|
146
|
|
147 .. class:: infomark
|
|
148
|
|
149 Contact Bruno Zeitouni (bruno.zeitouni@curie.fr) for any questions or concerns about the Galaxy implementation of IntersectBed.
|
|
150
|
|
151 </help>
|
|
152
|
|
153 </tool>
|