I have written a function, which takes aligned DNA sequences and replaces "-" with "Z" if the "-" is both preceded and followed by other bases.