---
name: "Algorithm::HMM"
section: "3pm"
platform: "linux"
package: "psortb"
version: "3.0.6+dfsg-4+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Algorithm::HMM"
---

# Algorithm::HMM(3pm)

Perl bindings for a Hidden Markov Model library.

## NAME

Algorithm::HMM - Perl bindings for a Hidden Markov Model library.

## SYNOPSIS

```
  use Algorithm::HMM;
  # Load a Hidden Markov Model.
  my $hmm = new Algorithm::HMM(Model => 'sample.hmm');
  # Run a sequence through the loaded model.
  my $rep = $hmm->search("AAIELKBPOWELKQJPASDLKJIGE");
  # Get all the global hits from the search.
  my @ghits = $rep->global_hits();
  # Get all the domain hits from the search.
  my @dhits = $rep->domain_hits();
  # Display information about the domain hits.
  for (@dhits) {
    print("pvalue = " . $_->pvalue . "\n");
    print("evalue = " . $_->evalue . "\n");
    print("score  = " . $_->score  . "\n");
  }
  # Save the model to a different file.
  $hmm->save("sample.hmm.0");
  # Load the saved model again.
  $hmm->load("sample.hmm.1")
```
