pal.distance
Class PairwiseDistance
java.lang.Object
|
+--pal.distance.PairwiseDistance
- All Implemented Interfaces:
- java.io.Serializable
- public class PairwiseDistance
- extends java.lang.Object
- implements java.io.Serializable
determines the (observed and ML) distance between a pair of sequences
- See Also:
- Serialized Form
Field Summary |
double |
distance
last estimated distance |
double |
distanceSE
last estimate standard error of a distance |
Method Summary |
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) |
double |
getDistance(int s1,
int s2)
compute distance between two sequences in the given alignment |
void |
updateModel(SubstitutionModel m)
update model of substitution |
void |
updateSitePattern(SitePattern sp)
update site pattern |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
distance
public double distance
- last estimated distance
distanceSE
public double distanceSE
- last estimate standard error of a distance
PairwiseDistance
public PairwiseDistance(SitePattern sp)
- Constructor 1 (estimate observed distances only)
- Parameters:
sp
- site pattern
PairwiseDistance
public PairwiseDistance(SitePattern sp,
SubstitutionModel m)
- Constructor 2 (uses evolutionary model)
- Parameters:
sp
- site patternm
- evolutionary model
updateModel
public void updateModel(SubstitutionModel m)
- update model of substitution
- Parameters:
model
- of substitution
updateSitePattern
public void updateSitePattern(SitePattern sp)
- 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)