def _mask_strange_sequence_letters(self, sequences, package_type):
if package_type == Create._PROTEIN_PACKAGE_TYPE:<EOL><INDENT>search_re = re.compile(r'<STR_LIT>',re.IGNORECASE)<EOL>replace_char = '<STR_LIT:X>'<EOL><DEDENT>elif package_type == Create._NUCLEOTIDE_PACKAGE_TYPE:<EOL><INDENT>search_re = re.compile(r'<STR_LIT>',re.IGNORECASE)<EOL>replace_char = '<STR_LIT:N>'<EOL><DEDENT>for s in sequences:<EOL><INDENT>if package_type == Create._NUCLEOTIDE_PACKAGE_TYPE:<EOL><INDENT>s.seq = s.seq.replace('<STR_LIT>','<STR_LIT:T>')<EOL>s.seq = s.seq.replace('<STR_LIT:u>','<STR_LIT:t>')<EOL><DEDENT>newseq = s.seq<EOL>m = search_re.search(newseq)<EOL>while m:<EOL><INDENT>logging.warn("<STR_LIT>"% (s.name, m.group()))<EOL>newseq = newseq[:m.start()] + replace_char + newseq[(m.start()+<NUM_LIT:1>):]<EOL>m = search_re.search(newseq)<EOL><DEDENT>s.seq = newseq<EOL><DEDENT>
Replace strange characters like selenocysteine (U) with X or N for
        protein and nucleotide sequences, respectively. Sequences are
        modified in place.

        Parameters
        ----------
        aligned_sequences: array of Sequence objects
            sequences to mask
        package_type: _PROTEIN_PACKAGE_TYPE or _NUCLEOTIDE_PACKAGE_TYPE
            type of sequences these are

        Returns
        -------
        None