I'm trying to figure out if there is a simple way to make a version of find() that can detect similar strings. Specifically, I'm trying to take the IUPAC codes for the non-ATGC DNA bases and allow them to be properly found.
For example, the character 'N' means that an A, T, G, or C can exist in that space, and 'Y' means that C or T can exist in that position. I've tried an approach with vectors that generates every possible permutation, but it's very long and seems very computationally expensive, and doesn't work properly yet. Any advice?