public class ObjectStringSmithWaterman extends ObjectString
LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
text
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Constructor and Description |
---|
ObjectStringSmithWaterman(AbstractObjectKey key,
java.lang.String sequence)
Creates a new instance of ObjectStringSmithWaterman for the given key and sequence.
|
ObjectStringSmithWaterman(java.io.BufferedReader stream)
Creates a new instance of ObjectStringSmithWaterman from the text stream.
|
ObjectStringSmithWaterman(int minLength,
int maxLength)
Creates a new instance of ObjectStringSmithWaterman with random generated sequence
with length between minLength and maxLength characters.
|
ObjectStringSmithWaterman(java.lang.String sequence)
Creates a new instance of ObjectStringSmithWaterman for the specified sequence.
|
ObjectStringSmithWaterman(java.lang.String locator,
java.lang.String sequence)
Creates a new instance of ObjectStringSmithWaterman for the given locator and sequence.
|
Modifier and Type | Method and Description |
---|---|
protected float |
getDistanceImpl(LocalAbstractObject obj,
float distThreshold)
Metric distance function.
|
static float[][] |
loadMatrix(java.io.BufferedReader reader)
Loads scoring matrix from InputStream
|
static float |
measure(java.lang.String s1,
java.lang.String s2,
float[][] scores)
Compares two sequences using Smith-Waterman algorithm.
|
binarySerialize, cloneRandomlyModify, dataEquals, dataHashCode, generateRandom, getBinarySize, getObjectKey, getSize, getStringData, getStringLength, toString, writeData
clearSurplusData, clone, clone, create, create, createMetaDistancesHolder, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceUpperBound, getDistanceUpperBoundImpl, getFieldsForNames, getMaxDistance, getNormDistance, getPrecomputedDistance, getPrecomputedDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, isDistanceCompatible, parseObjectComment, peekNextChar, readAttributesFromStream, readObjectComments, readObjectCommentsWithoutData, unchainFilter, write, write, writeAttributesToStream, writeObjectComment
clone, getLocatorURI, getNoDataObject, getObjectKey, getObjectLocatorURI, setObjectKey
public ObjectStringSmithWaterman(java.lang.String sequence)
sequence
- the protein sequencepublic ObjectStringSmithWaterman(AbstractObjectKey key, java.lang.String sequence)
sequence
- the protein sequencekey
- the key to associate with this objectpublic ObjectStringSmithWaterman(java.lang.String locator, java.lang.String sequence)
sequence
- the protein sequencelocator
- the locator to associate with this objectpublic ObjectStringSmithWaterman(int minLength, int maxLength)
minLength
- minimal length of the generated sequencemaxLength
- maximal length of the generated sequencepublic ObjectStringSmithWaterman(java.io.BufferedReader stream) throws java.io.IOException, java.io.EOFException
stream
- the text stream to read object fromjava.io.IOException
- when an error appears during reading from the given streamjava.io.EOFException
- when end of the given text stream is reachedprotected float getDistanceImpl(LocalAbstractObject obj, float distThreshold)
getDistanceImpl
in class ObjectString
obj
- the object to compute distance todistThreshold
- the threshold value on the distancepublic static float measure(java.lang.String s1, java.lang.String s2, float[][] scores)
s1
- the first protein sequences2
- the second protein sequencescores
- the scoring matrixpublic static float[][] loadMatrix(java.io.BufferedReader reader) throws java.io.IOException
reader
- is input streamjava.io.IOException
- if something bad happens during file read