rafalab / bumphunter

bumphunter
15 stars 14 forks source link

Bugfix #21

Closed sampoll closed 6 years ago

sampoll commented 7 years ago

This is the bug fix recommended by Hervé Pagès for a bug created by an update to the GenomicRanges and IRanges classes. GenomicRanges::nearest has been modified to improve internal consistency of Bioconductor classes.

Previously, GenomicRanges::nearest did not find all subject ranges at a distance of zero from a query range. It found overlapped ranges but not adjacent ranges. Now it finds both and if parameter select is not set to "all," it picks one randomly. matchGenes needs it to return the zero-distance range of maximum overlap if there is one.

GenomicRanges::nearest has been wrapped in a function called smarterNearest which checks all equally distant nearest ranges and chooses the one of maximum overlap.