def _remove_sequences_from_alignment(self, sequence_names, input_alignment_file, output_alignment_file):
nameset = set(sequence_names)<EOL>num_written = <NUM_LIT:0><EOL>with open(output_alignment_file, '<STR_LIT:w>') as f:<EOL><INDENT>for s in SeqIO.parse(open(input_alignment_file), "<STR_LIT>"):<EOL><INDENT>if s.name not in nameset:<EOL><INDENT>SeqIO.write(s, f, "<STR_LIT>")<EOL>num_written += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>logging.debug("<STR_LIT>" % num_written)<EOL>return num_written<EOL>
Remove sequences from the alignment file that have names in
        sequence_names

        Parameters
        ----------
        sequence_names: list of str
            names of sequences to remove
        input_alignment_file: str
            path to alignment file to remove from
        output_alignment_file: str
            path to alignment file to write to

        Returns
        -------
        int: number of sequences written to file