def CheckResult( self,
                     result,
                     info1, info2):
        """check if result is ok. Check for each fragment, if it overlaps
        with the domains to be tested and dump if ok. This simulates
        psiblast.
        """

        row_from, row_to = map(string.atoi, info1[1:3])
        col_from, col_to = map(string.atoi, info2[1:3])

        ## check for overlap
        for fragment in self.mFragments:
            
            # print alignlib.writeAlignataTable( fragment, 8, 1)
            
            xcol_from = Tools.MapRight(fragment, row_from )
            xcol_to   = Tools.MapLeft(fragment, row_to )

            overlap = min(col_to, xcol_to) - max(col_from, xcol_from)

            # print self.mMinOverlap, overlap, xcol_from, xcol_to, col_from, col_to

            if overlap > self.mMinOverlap:
            
                return map(str, (fragment.getScore(),
                                 fragment.getLength(),
                                 fragment.getNumGaps(),
                                 alignlib.calculatePercentSimilarity( fragment ),
                                 fragment.getRowFrom(), fragment.getRowTo(),
                                 fragment.getColFrom(), fragment.getColTo(),
                                 overlap, xcol_from, xcol_to,
                                 (xcol_to - xcol_from) - (col_from - col_to)) )
            
        return ("0",) * 12
        
##--------------------------------------------------------------------------------------
dataset/ETHPy150Open CGATOxford/cgat/legacy/ScopTester.py/AlignatorIterative.CheckResult/swapped operands of `-`