---
name: "ptoh"
section: "1"
platform: "linux"
package: "pftools"
version: "3.2.12-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ptoh"
---

# ptoh(1)

converts a PROSITE formatted profile into an approximately equivalent HMM

## NAME

ptoh - converts a PROSITE formatted profile into an approximately equivalent HMM

## SYNOPSIS

- **ptoh**

  \[ **-fFhs** \] \[ **-D** *del\_to\_del* \] \[ **-I** *ins\_to\_ins* \] \[ **-L** *log\_base* \] \[ *profile* \| **-** \] \[ *random\_model* \] \[ *parameters* \]

## DESCRIPTION

**ptoh** converts a PROSITE formatted generalized profile into an approximately equivalent HMMER1 (default) or SAM formatted hidden Markov model (HMM). The file '*profile*' is a nucleic acid or protein profile in PROSITE format. If '**-**' is specified instead of a filename, the profile is read from the standard input. The random\_model file contains a simple null-model in the format used by the HMM search programs of the HMMER1 package. The result is written to the standard output.

The profile-to-HMM conversion method is described in Bucher *et al.* (1996).  All profile scores corresponding to transitions which are not supported by the HMM architectures of the SAM and HMMER1 packages, are ignored.  If no random model is specified on the command line,  the null model given in the GENERAL\_SPEC data block of the profile is used.  If this is also missing, a flat residue distribution is assumed.

## OPTIONS

- *profile*

  Input PROSITE generalized profile. The motif described by the profile will be converted into an approximately equivalent HMM. If the filename is replaced by a '**-**', **ptoh** will read the input profile from **stdin**.

- *random\_model*

  Input random model file.\
   This file should contain a simple null-model using the same residue alphabet as the *profile*.

- **-f**

  Generate free insert-modules (FIMs) at the beginning and at the end of the model which approximately emulate domain-global or semi-global alignment mode  (*see* Bucher *et al.* 1996).

- **-F**

  Generate free insert-modules (FIMs) at the beginning and at the end of the model which approximately emulate  local alignment mode.

- **-h**

  Display usage help text.

  - Note:

    The meaning of this option has changed between version 2.2 and the current release of the **pftools** package. No option is needed to get HMMER1 output format because it is the default (*see* option **-s**).

- **-s**

  Output in SAM format.

- **-D** *del\_to\_del*

  Delete-to-delete transition probabilities.\
   They are used in conjunction with FIMs (options  **-f**, **-F**). This value will be imposed on all delete-to-delete transitions of the model. The other outgoing transitions from the affected delete states will be renormalized to satisfy the "sum to one" requirement.  Note that the application of the  *D* parameter precedes the application of the *I* parameter. Delete-to-delete probabilities at the beginning and at the end of the model may thus change again as a result of renormalizations   following the application of the   *I* parameter.\
   Default: 0.9

- **-I** *ins\_to\_ins*

  Insert-to-insert transition probabilities.\
   They are used in the FIMs (options  **-f**, **-F**). This value will be imposed on the first and the last match-to-insert and insert-to-insert  transition probabilities of the model.  The other outgoing transitions of the affected states  will be renormalized such as to satisfy the "summing to one" requirement. If the  **-F** option is simultaneously set, the *I* parameter will also be imposed on the insert-to-delete transition probability at the beginning, and on the delete-to-insert transition probability at the  end of the model.\
   Default: 0.99

- **-L** *log\_base*

  Logarithmic base.\
   Specifies the logarithmic base used for conversion of the profile scores into HMM probabilities (The profile scores are interpreted as log-odds ratios, *see* Bucher *et al.* 1996). This value over-writes the logarithmic base  specified within the profile by the optional  *LOG\_BASE* parameter.\
   Default: 1.0233739 (1/30 bit units)

## PARAMETERS

- Note:

  for backwards compatibility, release 2.3 of the **pftools** package will parse the version 2.2 style parameters, but these are *deprecated* and the corresponding option (refer to the *options* section) should be used instead.

- D=#

  Delete-to-delete transition probabilities.\
   Use option **-D** instead.

- I=#

  Insert-to-insert transition probabilities.\
   Use option **-I** instead.

- L=#

  Logarithmic base.\
   Use option **-L** instead.

## EXAMPLES

- (1)

  **ptoh** -Fs -L 1.0233739 sh3.prf standard.random \> sh3.hmm

-

  Generates a SAM formatted HMM for the SH3 domain from a profile. The file '*sh3.prf*' contains the source profile in PROSITE format. The file '*standard.random*' contains the null-model used for conversion of the log-odds ratios into probabilities. The logarithmic base 1.0233739 corresponds to 1/30 bits, the implicit scale of the profile. The  **-F** option causes the HMM to emulate local alignment (fragment search) mode.

## EXIT CODE

On successful completion of its task, **ptoh** will return an exit code of 0. If an error occurs, a diagnostic message will be output on standard error and the exit code will be different from 0. When conflicting options where passed to the program but the task could nevertheless be completed, warnings will be issued on standard error.

## REFERENCES

Bucher P, Karplus K, Moeri N & Hofmann, K. (1996). *A flexible motif search* *technique based on generalized* *profiles.* Comput. Chem. **20**:3-24.

## AUTHOR

The **pftools** package was developed by Philipp Bucher.\
 Any comments or suggestions should be addressed to \<pftools@sib.swiss\>.
