arq5x/bedtools — pull request #14 by jakebiesinger (2012-01-28 23:44:51+00:00)
Title: Regression on -wao?

It seems that ```intersectBed -wao``` isn't reporting all features in A, as expected according to the docs:

```
-wao Write the original A and B entries plus the number of base
pairs of overlap between the two features.
- Overlapping features restricted by -f and -r.
However, A features w/o overlap are also reported
with a NULL B feature and overlap = 0
```

See the following:

```
$ cat a.bed
chr1 1 100 feature1 0 +
chr1 100 200 feature2 0 +
chr1 150 500 feature3 0 -
chr1 900 950 feature4 0 +
$ cat b.bed
chr1 155 200 feature5 0 -
chr1 800 901 feature6 0 +
$ intersectBed -a a.bed -b b.bed -wao
chr1 100 200 feature2 0 + chr1 155 200 feature5 0 - 45
chr1 150 500 feature3 0 - chr1 155 200 feature5 0 - 45
chr1 900 950 feature4 0 + chr1 800 901 feature6 0 + 1
```

feature1 is missing from the output. This commit fixes the problem afaict for -wao, including when a fractional or reciprocal overlap is requested (-f and -r).

Regression cause might be that ```BedIntersect::ReportOverlapSummary``` is no longer called when -wao is requested since _printable on https://github.com/jakebiesinger/bedtools/pull/new/master#L0L62 implies 1 or more lines from B will be reported. -wao is a special case where sometimes B features are reported and sometimes they aren't.