def mapper(self, key, pair):
        """Calculate running statistics for each alignment pair."""

        x, y = pair
        d = distance_between(x, y)

        if d < 0:
            self.stats['overlap'].add_data(d * -1)
        else:
            self.stats['gap'].add_data(d)
Beispiel #2
0
    def mapper(self, key, pair):
        """
        Valid pairs must have...
          - the same reference
          - opposite strands
          - a distance between them within the given bounds
        """

        x, y = pair
        d = distance_between(x, y)
        if d >= self.options.min_distance and d <= self.options.max_distance:
            yield key, pair
Beispiel #3
0
    def mapper(self, key, pair):
        """
        Valid pairs must have...
          - the same reference
          - opposite strands
          - a distance between them within the given bounds
        """

        x, y = pair
        d = distance_between(x, y)
        if d >= self.options.min_distance and d <= self.options.max_distance:
            yield key, pair