def scoring_matrix_inplace(this_c, that_c, scoring_points):
    """ Generate a scoring matrix such that matching has the highest value, transitions are penalised,
    transversions are penalised even more, and gaps are penalised the most. Reminder: A-G, C-T transitions,
    other combinations ase transversions. """
    if this_c == that_c:
        return scoring_points['M']
    if this_c == '_' or that_c == '_':
        return scoring_points['G']
    maxb, minb = max(this_c, that_c), min(this_c, that_c)
    if (minb == 'A' and maxb == 'G') or (minb == 'C' and maxb == 'T'):
        return scoring_points['Ti']
    else:
        return scoring_points['Tv']