def best_hits(self):
        """
        returns a dict with query => best mapped position
        """
        self.quality_sort()

        best_hits = dict((query, next(blines)) for (query, blines) in \
                        groupby(self, lambda x: x.query))

        self.ref_sort()

        return best_hits