# Class DnaSubsequenceComparator<T extends DnaSequence>

java.lang.Object
org.snpeff.binseq.comparator.SubsequenceComparator<T>
org.snpeff.binseq.comparator.DnaSubsequenceComparator<T>

public class DnaSubsequenceComparator<T extends DnaSequence> extends SubsequenceComparator<T>
Compares two subsequences of DNA (DnaSequence)

Author:
  pcingola

## Constructor Summary

Constructors
Constructor
Description
`DnaSubsequenceComparator(boolean differentLengthsAreEqual)`
`DnaSubsequenceComparator(boolean differentLengthsAreEqual, int maxDifferentBases)`

## Method Summary

Modifier and Type
Method
Description
`int`
`compare(DnaSequence seq1, int index1, DnaSequence seq2, int index2)`
`int`
`score(DnaSequence seq1, int index1, DnaSequence seq2, int index2)`
`int`
`scoreSlow(DnaSequence seq1, int index1, DnaSequence seq2, int index2)`
This method is used when none of the indexes is zero.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DnaSubsequenceComparator

public DnaSubsequenceComparator(boolean differentLengthsAreEqual)

### DnaSubsequenceComparator

public DnaSubsequenceComparator(boolean differentLengthsAreEqual, int maxDifferentBases)

## Method Details

### compare

public int compare(DnaSequence seq1, int index1, DnaSequence seq2, int index2)

Specified by:
  `compare` in class `SubsequenceComparator<T extends DnaSequence>`

### score

public int score(DnaSequence seq1, int index1, DnaSequence seq2, int index2)

Specified by:
  `score` in class `SubsequenceComparator<T extends DnaSequence>`

### scoreSlow

public int scoreSlow(DnaSequence seq1, int index1, DnaSequence seq2, int index2)
This method is used when none of the indexes is zero. Also used for debugging and comparison

Parameters:
  `seq1` -
  `index1` -
  `seq2` -
  `index2` -
Returns: