Find overlaps
By default, intersect reports intervals that represent overlaps between your two files. To demonstrate, let’s identify all of the CpG islands that overlap exons:
In this case, the intervals reported are NOT the original CpG intervals, but rather a refined interval reflecting solely the portion of each original CpG interval that overlapped with the exon(s).
The -wa (write A) and -wb (write B) options allow one to see the original records from the A and B files that overlapped.
As such, instead of not only showing you where the intersections occurred, it shows you what intersected.