I have been using BEDtools intersect to determine on-target proportions of reads from BAM files in a BED. I used the -c flag which specifies that "For each entry in A, report the number of hits in B" which is exactly what I want. Output is in the form:
chr1 9999 10062 HISEQ:529:C71NKANXX:3:1305:12386:7195/2 0 ...
So in this case, the read does not overlap any feature in my BED file. I looked into this as colleagues were querying the method and found that the output from BEDtools stops at 60. Is this a local maximum to save time? There is nothing about this in documentation.
Also while I am asking, is there a better way to determine on-target reads and bases? Intersect seemed to be able to give me both (using -wao flag and increment on col 16 for bases). Picard HSmetrics is good but lacks on-target reads values.