@staticmethod
def score(row, is_protein=False):
    """
        direct translation from ucsc guidelines on replicating the web blat score
        https://genome.ucsc.edu/FAQ/FAQblat.html#blat4

        below are lines from the perl code i've re-written in python

        ::

            my $sizeMul = pslIsProtein($blockCount, $strand, $tStart, $tEnd, $tSize, $tStarts, $blockSizes);
            sizmul = 1 for DNA
            my $pslScore = $sizeMul * ($matches + ($repMatches >> 1) ) - $sizeMul * $misMatches - $qNumInsert - $tNumIns
                ert)
        """
    size_mul = 1 if not is_protein else 3
    score = size_mul * (row['match'] + (row['repmatch'] >> 1)
        ) - size_mul * row['mismatch'] - row['qgap_count'] - row['tgap_count']
    return score
