-log($closeness). The hash array should be accessed only through the subroutines defined here.
fHGT::Distance::@DNA_ALPHABET = ('A', 'C', 'G', 'T'); fHGT::Distance::@BINARY_ALPHABET = ('1', '0'); fHGT::Distance::@RNA_ALPHABET =('A', 'C', 'G', 'U');
All are importable.
If the argument is true, then the comments in the files read are written to
STDOUT (or whatever else it is set to by
previously). This is the default behavior. If the argument is false, then
the comments from the input files are not copied.
($num_taxa, %close) = fHGT::Distance::ReadMatrix($input_file, \@taxon_name);
Reads the pairwise closeness values into the hash array.
$input_file can be
'STDIN', in which case standard input is read. In any case, the format is set by
WriteMatrix. The taxon names are stored in
Writes the pairwise closeness values given by the hash array onto stdout.
The names are
@taxon_names[1...$#taxon_names]. The format is simple. for each taxon, the name is stated with a colon
after it and then the closeness to every taxon is printed, one by line.
($num_taxa, %close) = fHGT::Distance::ReadSample($sample_file);
Reads in a sample and computes the pairwise closeness values.
$close_xy = fHGT::Distance::ClosePair(\%closeness, $x, $y);
Returns the closeness of two terminal taxa.
$close_xyz = fHGT::Distance::CloseTriplet(\%closeness, $x, $y, $z);
Returns the triplet's average closeness.
$dist_xy = fHGT::Distance::DistancePair(\%closeness, $x, $y);
Returns the pairwise distance of two taxa.
fHGT::Distance::SetClosePair(\%close, $x, $y, $close_xy);
Sets the closeness of the given taxa.
fHGT::Distance::AddToClosePair(\%close, $x, $y, $w);
Equivalent to (but faster than)
$c = fHGT::Distance::AddToClosePair(\%close, $x, $y); fHGT::Distance::AddToClosePair(\%close, $x, $y, $c+$w);
Converts the closeness values to distances.
Converts the distance values to closenesses.
Writes the distance matrix onto stdout in a nice format. Used only for diagnostics (required sample length etc.).
%distance = fHGT::Distance::_DiffDistance(\%distance1, \%distance2);
Calculates the difference of two distance matrices.
%distance2. I used it for testing convergence rates.
fHGT::Distance::_Debug($boolean); # detailed debug info wanted?
$Id: Distance.pm,v 1.5 1999/02/09 06:23:32 csuros Exp csuros $
Up | Previous (fHGT::Bipartition) | Next (fHGT::Node)