def execute( self, notification ) : proxy = self.facade.retrieveProxy( RunningStateProxy.NAME ) settings = proxy.getData()[ PairwiseSelectorVO.VONAME ] data = proxy.getData()[ DataSelectorVO.VONAME ] matrix = proxy.getData()[ MatrixFileVO.VONAME ].matrix if settings.analysisBoxValue == 'Affine': try : openGap = int( settings.openGapValue ) except ValueError : openGap = StaticStateProxy.DEFAULT_OPEN_PENALTY try : extendGap = int( settings.extendedGapValue ) except ValueError : extendGap = StaticStateProxy.DEFAULT_EXT_PENALTY result = Sequencing.affineSequence( 1, openGap, extendGap, matrix, data.sequenceOne, data.sequenceTwo ) else : try : gapPenalty = int( settings.gapPenaltyValue ) except ValueError : gapPenalty = StaticStateProxy.DEFAULT_GAP_PENALTY if settings.analysisBoxValue == 'Global': useGlobal = 1 else : useGlobal = 0 result = Sequencing.linearSequence( useGlobal, gapPenalty, matrix, data.sequenceOne, data.sequenceTwo ) self.sendNotification( Messages.SHOW_RESULTS, result ) self.sendNotification( Messages.UPDATE_STATUS_TEXT, 'Sequences successfully aligned.' )
def execute(self, notification): proxy = self.facade.retrieveProxy(RunningStateProxy.NAME) settings = proxy.getData()[PairwiseSelectorVO.VONAME] data = proxy.getData()[DataSelectorVO.VONAME] matrix = proxy.getData()[MatrixFileVO.VONAME].matrix if settings.analysisBoxValue == 'Affine': try: openGap = int(settings.openGapValue) except ValueError: openGap = StaticStateProxy.DEFAULT_OPEN_PENALTY try: extendGap = int(settings.extendedGapValue) except ValueError: extendGap = StaticStateProxy.DEFAULT_EXT_PENALTY result = Sequencing.affineSequence(1, openGap, extendGap, matrix, data.sequenceOne, data.sequenceTwo) else: try: gapPenalty = int(settings.gapPenaltyValue) except ValueError: gapPenalty = StaticStateProxy.DEFAULT_GAP_PENALTY if settings.analysisBoxValue == 'Global': useGlobal = 1 else: useGlobal = 0 result = Sequencing.linearSequence(useGlobal, gapPenalty, matrix, data.sequenceOne, data.sequenceTwo) self.sendNotification(Messages.SHOW_RESULTS, result) self.sendNotification(Messages.UPDATE_STATUS_TEXT, 'Sequences successfully aligned.')
def doAffinePairwise(openGap, extendGap, matrix, sequenceOne, sequenceTwo): # elements 0 and 1 of the return value of the affine sequence are the strings ith gaps inserted. score = Sequencing.affineSequence(1, openGap, extendGap, matrix, sequenceOne, sequenceTwo)[2] return score
def doAffinePairwise( openGap, extendGap, matrix, sequenceOne, sequenceTwo ) : # elements 0 and 1 of the return value of the affine sequence are the strings ith gaps inserted. score = Sequencing.affineSequence( 1, openGap, extendGap, matrix, sequenceOne, sequenceTwo )[ 2 ] return score