This covers all cases where the pattern (con
) contains ambiguous bases and the subjects (seq
) are unambiguous, changing the matrix so the subjects are not penalized. However, these edits do not account for cases where both the pattern and the subject have ambiguous encodings at the same position; e.g. ["M","V"]
and ["V","M"]
have the same value associated with them, even though V (A || C || G
) is a superset of M (A || C
). There are also more nuanced cases where the set of bases represented by a pair of ambiguous encodings overlap incompletely in both directions, as with H (["H","D"]A || C || T
) and D (["D","H"]A || G || T
). Given enough time, I could probably figure out the appropriate scores for each case to complete the asymmetric substitution matrix, but I'm surely reinventing the wheel. Can someone supply, as a standalone table or as part of a codebase, an asymmetric nucleotide substitution matrix that satisfies the criteria outlined herein?