def get_longest_orf(self):
        dirs = ("+", "-")
        for direction in dirs:
            self.sequence = self.seq
            if direction == "-":
                self.sequence = rc(self.sequence)
            for frame in xrange(3):
                self.scan_sequence(frame, direction)

        strand, frame, start, end, length = self.result
        size = self.size
        if strand == '-':
            start, end = size - end, size - start
            self.result[2 : 4] = start, end

        assert end <= start, self.result
        if start == end:
            return "N"

        orf = self.seq[start : end]
        if strand == '-':
            orf = rc(orf)

        assert len(orf) % 3 == 0

        return orf
dataset/ETHPy150Open tanghaibao/jcvi/formats/fasta.py/ORFFinder.get_longest_orf/swapped operands of `<=`