def hmmsearch(self, input_pipe, hmms, output_files):
<EOL>if len(hmms) != len(output_files):<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>queue = []<EOL>for i, hmm in enumerate(hmms):<EOL><INDENT>queue.append( [hmm, output_files[i]] )<EOL><DEDENT>while len(queue) > <NUM_LIT:0>:<EOL><INDENT>pairs_to_run = self._munch_off_batch(queue)<EOL>cmd = self._hmm_command(input_pipe, pairs_to_run)<EOL>logging.debug("<STR_LIT>" % cmd)<EOL>try:<EOL><INDENT>extern.run(cmd)<EOL><DEDENT>except extern.ExternCalledProcessError as e:<EOL><INDENT>if e.stderr == '<STR_LIT>':<EOL><INDENT>raise NoInputSequencesException(cmd)<EOL><DEDENT>else:<EOL><INDENT>raise e<EOL><DEDENT><DEDENT><DEDENT>
r"""Run HMMsearch with all the HMMs, generating output files

        Parameters
        ----------
        input_pipe: String
            A string which is a partial command line. When this command is run
            is outputs to STDOUT fasta formatted protein sequences, which
            hmmsearch runs on.
        hmms: list of paths
            A list of (string) paths to HMM files which are used to search with.
        output_files: list of paths
            A list of (string) paths to output CSV files to be generated by the
            HMM searching

        Returns
        -------
        N/A

        May raise an exception if hmmsearching went amiss