Example #1
0
    def alignTwoMessages(self, doInternalSlick, message1, message2):
        # First we serialize the two messages
        (serialMessages, format) = TypeConvertor.serializeMessages([message1, message2], self.unitSize)

        debug = False
        (score1, score2, score3, regex, mask) = _libNeedleman.alignTwoMessages(doInternalSlick, format, serialMessages, debug)
        scores = (score1, score2, score3)
        alignment = self.deserializeAlignment(regex, mask)

        return (scores, alignment)
Example #2
0
    def align(self, doInternalSlick, messages):
        # First we serialize the two messages
        (serialMessages, format) = TypeConvertor.serializeMessages(messages, self.unitSize)

        debug = False
        (score1, score2, score3, regex, mask) = _libNeedleman.alignMessages(doInternalSlick, len(messages), format, serialMessages, self.cb_executionStatus, debug)
        scores = (score1, score2, score3)

        alignment = self.deserializeAlignment(regex, mask)
        alignment = self.smoothAlignment(alignment)
        return (alignment, scores)
Example #3
0
    def deserializeMessages(self, messages):
        # First we serialize the messages
        (serialMessages, format) = TypeConvertor.serializeMessages(messages, self.unitSize)

        debug = False
        return _libNeedleman.deserializeMessages(len(messages), format, serialMessages, debug)