ScoringScheme (NeoBio API)

Overview | Package | Class | Tree | Index | Help
| NeoBio API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## neobio.alignment
Class ScoringScheme

    java.lang.Object
      |
      +--neobio.alignment.ScoringScheme

Direct Known Subclasses:
  BasicScoringScheme, ScoringMatrix

public abstract class ScoringScheme
extends java.lang.Object

This abstract class is the superclass of all scoring schemes. It defines basic operations that must be provided by all subclasses. Scoring schemes are used by sequence alignment algorithms to compute the score of an alignment.

Author:
  Sergio A. de Carvalho Jr.
See Also:
  `PairwiseAlignmentAlgorithm`

Field Summary
`protected boolean` | `case_sensitive` Determines whether this scoring scheme ignores the case of characters when computing their score.

Constructor Summary
`ScoringScheme()` Creates a new instance of an scoring scheme.
`ScoringScheme(boolean case_sensitive)` Creates a new instance of an scoring scheme.

Method Summary
`boolean` | `isCaseSensitive()` Tells whether this scoring scheme ignores the case of characters when computing their score.
`abstract boolean` | `isPartialMatchSupported()` Returns `true` if this scoring scheme supports partial matches, `false` otherwise.
`abstract int` | `maxAbsoluteScore()` Returns the maximum absolute score that this scoring scheme can return for any substitution, deletion or insertion.
`abstract int` | `scoreDeletion(char a)` Returns the score of a deletion of character `a` according to this scoring scheme.
`abstract int` | `scoreInsertion(char a)` Returns the score of an insertion of character `a` according to this scoring scheme.
`abstract int` | `scoreSubstitution(char a, char b)` Returns the score of a substitution of character `a` for character `b` according to this scoring scheme.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### case_sensitive

    protected boolean case_sensitive

  Determines whether this scoring scheme ignores the case of characters when computing their score. It is set by the constructor and cannot be changed afterwards.

Constructor Detail

### ScoringScheme

    public ScoringScheme()

  Creates a new instance of an scoring scheme. The case of characters is significant when subsequently computing their score.

### ScoringScheme

    public ScoringScheme(boolean case_sensitive)

  Creates a new instance of an scoring scheme. If `case_sensitive` is `true`, the case of characters is significant when subsequently computing their score; otherwise the case is ignored.

Parameters:
  `case_sensitive` - `true` if the case of characters must be significant, `false` otherwise

Method Detail

### isCaseSensitive

    public boolean isCaseSensitive()

  Tells whether this scoring scheme ignores the case of characters when computing their score.

  Returns:
    `true` if the case of characters is significant, `false` otherwise

### scoreSubstitution

    public abstract int scoreSubstitution(char a,
                                          char b)
                                   throws IncompatibleScoringSchemeException

  Returns the score of a substitution of character `a` for character `b` according to this scoring scheme. If this substitution is not defined, an exception is raised.

  Parameters:
    `a` - first character
    `b` - second character
  Returns:
    score of substitution of `a` for `b`
  Throws:
    `IncompatibleScoringSchemeException` - if this substitution is not defined

### scoreInsertion

    public abstract int scoreInsertion(char a)
                                throws IncompatibleScoringSchemeException

  Returns the score of an insertion of character `a` according to this scoring scheme. If this character is not recognised, an exception is raised.

  Parameters:
    `a` - the character to be inserted
  Returns:
    score of insertion of `a`
  Throws:
    `IncompatibleScoringSchemeException` - if character is not recognised by this scoring scheme

### scoreDeletion

    public abstract int scoreDeletion(char a)
                               throws IncompatibleScoringSchemeException

  Returns the score of a deletion of character `a` according to this scoring scheme. If this character is not recognised, an exception is raised.

  Parameters:
    `a` - the character to be deleted
  Returns:
    score of insertion of `a`
  Throws:
    `IncompatibleScoringSchemeException` - if character is not recognised by this scoring scheme

### maxAbsoluteScore

    public abstract int maxAbsoluteScore()

  Returns the maximum absolute score that this scoring scheme can return for any substitution, deletion or insertion.

  Returns:
    maximum absolute score that can be returned

### isPartialMatchSupported

    public abstract boolean isPartialMatchSupported()

  Returns `true` if this scoring scheme supports partial matches, `false` otherwise. A partial match is a situation when two characters are not equal but, for any reason, are regarded as similar by this scoring scheme, which then returns a positive score. This is common when for scoring schemes that implement amino acid scoring matrices.

  Returns:
    `true` if this scoring scheme supports partial matches, `false` otherwise

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

http://neobio.sourceforge.net
NeoBio is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. NeoBio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with NeoBio; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.