# MetricParams-class: Class "MetricParams" In peplib: Peptide Library Analysis Methods

## Description

This class stores the parameters used for calcaulting sequence-sequence distances. The parameters are all based on the use of substitution matrices and scores. For example, the BLOSUM matrices may be used. Three possible matrices can be accessed using a call to `data(blosumXX)` command to create new parameter sets, where `XX` is 50, 62, or 90. These metric parameter are passed into a few other methods, see the examples below.

## Objects from the Class

Objects can be created by calls of the form ```new("MetricParams", smatrix=blosumXX, gapOpen=-10, gapExtension=-0.2)```.

## Slots

`smatrix`:

Object of class `"matrix"` The substitution matrix, where each element represent the `log2` of the probability of mutating to that residue. For example, column 3, row 7 is `log2` of the probability of mutating from 3 to 7. However, these probabilities are not normalized correctly; instead substition matrices were designed to have the sum of theirs `log2`s of the probabilities be negative.

`gapOpen`:

Object of class `"numeric"` The penalty score for opening a gap

`gapExtension`:

Object of class `"numeric"` The penalty score for extending an exisgting gap

## Methods

No methods defined with class "MetricParams" in the signature.

## Author(s)

Andrew White

`Sequences` the `dist` method.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```#Load the classic BLOSUM62 matrix data(blosum62) #Set slightly different gap open, and gap extend parameters b62params <- new("MetricParams", smatrix=blosum62, gapOpen=-8, gapExtension=-5) data(TULASequences) plot(TULASequences, params=b62params) #Change the metric parameters to a more stringent substitution matrix data(blosum90) b90 <- new("MetricParams", smatrix=blosum90, gapOpen=-8, gapExtension=-5) plot(TULASequences, params=b90) ```