Package pal.distance
Class PairwiseDistance
java.lang.Object
pal.distance.PairwiseDistance
- All Implemented Interfaces:
Serializable
determines the (observed and ML) distance between a pair of sequences
- Version:
- $Id: PairwiseDistance.java,v 1.10 2002/09/08 03:47:01 matt Exp $
- Author:
- Korbinian Strimmer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoublelast estimated distancedoublelast estimate standard error of a distance -
Constructor Summary
ConstructorsConstructorDescriptionConstructor 1 (estimate observed distances only)Constructor 2 (uses evolutionary model) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDistance(byte[] s1, byte[] s2) compute distance between two sequences (not necessarly in the given alignment but with the same weights in the site pattern)doublegetDistance(int s1, int s2) compute distance between two sequences in the given alignmentvoidupdate model of substitutionvoidupdate site pattern
-
Field Details
-
distance
public double distancelast estimated distance -
distanceSE
public double distanceSElast estimate standard error of a distance
-
-
Constructor Details
-
PairwiseDistance
Constructor 1 (estimate observed distances only)- Parameters:
sp- site pattern
-
PairwiseDistance
Constructor 2 (uses evolutionary model)- Parameters:
sp- site patternm- evolutionary model
-
-
Method Details
-
updateModel
update model of substitution- Parameters:
model- of substitution
-
updateSitePattern
update site pattern- Parameters:
site- pattern
-
getDistance
public double getDistance(int s1, int s2) compute distance between two sequences in the given alignment- Parameters:
s1- number of first sequences2- number of second sequence- Returns:
- estimated distance (observed or ML, depending on constructor used)
-
getDistance
public double getDistance(byte[] s1, byte[] s2) compute distance between two sequences (not necessarly in the given alignment but with the same weights in the site pattern)- Parameters:
s1- site pattern of first sequences2- site pattern of second sequence- Returns:
- estimated distance (observed or ML, depending on constructor used)
-