def fromPair(self,
                 query_start, query_size, query_strand, query_seq,
                 target_start, target_size, target_strand, target_seq):

        self.mQueryLength = query_size
        self.mSbjctLength = target_size

        map_query2target = alignlib_lite.py_makeAlignmentBlocks()

        assert len(query_seq) == len(target_seq)

        x, y = query_start, target_start
        nmatches, nmismatches = 0, 0
        for q, t in zip(query_seq, target_seq):
            tq, tt = q != "-", t != "-"
            if tq and tt:
                map_query2target.addPair(x, y)
                if q == t:
                    nmatches += 1
                else:
                    nmismatches += 1

            if tq:
                x += 1
            if tt:
                y += 1

        self.mNMatches, self.mNMismatches = nmatches, nmismatches
        self.strand = query_strand
        # the following call will set query_from, query_to for the forward strand
        # though block coordinates might be on the negative strand
        self.fromMap(map_query2target, use_strand=True)

        # if target is on negative strand, swop strands
        if target_strand == "-":
            # swap target strand - this will also swap the query strand
            self.switchTargetStrand()
fill from two aligned sequences.
dataset/ETHPy150Open CGATOxford/cgat/obsolete/BlatTest.py/Match.fromPair