def _get_hmm_from_alignment(self, alignment, hmm_filename, output_alignment_filename):
logging.info("<STR_LIT>")<EOL>with tempfile.NamedTemporaryFile(suffix='<STR_LIT>',prefix='<STR_LIT>') as tempaln:<EOL><INDENT>cmd = "<STR_LIT>" % (<EOL>hmm_filename, alignment)<EOL>process = subprocess.Popen(["<STR_LIT>", "<STR_LIT:-c>", cmd],<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.PIPE)<EOL>output, error = process.communicate()<EOL>logging.debug("<STR_LIT>" % error)<EOL>if process.returncode != <NUM_LIT:0>:<EOL><INDENT>logging.error(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>logging.error("<STR_LIT>" % error)<EOL><DEDENT>SeqIO.write(SeqIO.parse(StringIO(output), '<STR_LIT>'), tempaln, '<STR_LIT>')<EOL>tempaln.flush()<EOL>ptype, _ = self._pipe_type(hmm_filename)<EOL>SequenceSearcher(hmm_filename).alignment_correcter([tempaln.name],<EOL>output_alignment_filename)<EOL>return ptype<EOL><DEDENT>
Return a HMM file and alignment of sequences to that HMM

        Parameters
        ----------
        alignment: str
            path to aligned proteins
        hmm_filename: str
            write the hmm to this file path
        output_alignment_filename: str
            write the output alignment to this file path

        Returns
        -------
        Return the pipeline type of the HMM.