distance.matrix.1locus(gendata, distmetric = Bruvo.distance,
progress = TRUE, ...)
TRUE
, distance.matrix.1locus
will
print the names of sample pairs as it finishes each calculation
with distmetric
. For large datasets, this is intended so
that the user can monitor the progress of distmetric
. For
example, with Bruvo.distance
, maxl
, usatnt
, or
missing
may be used.distance.matrix.1locus
produces a symmetrical matrix of pairwise distances between
genotypes. If using a polysat genotype object such as that produced
by read.GeneMapper
, the gendata
argument should be one
of the sublists, for example mygenotypedata[,"locus1"]
.
The measure of distance can be any that is provided with polysat, or
any function written by the user, so long as it takes genotypes as
vectors of alleles (or any other type of object that is given as
elements of the list gendata
) and returns a numerical distance.
Any arguments that need to be passed to the distmetric
function
can be given to distance.matrix.1locus
. To save processing
time, each pairwise distance is only calculated once and then written
to both locations in the matrix simultaneously. The user also has the
option to have each pair of sample names printed after the distance is
calculated, so that progress can be monitored if evaluation is
expected to take a long time.Bruvo.distance
, Lynch.distance
, meandistance.matrix
mygenotypes <- list(IND1=c(124,127,133), IND2=c(130,139,145,151),
IND3=c(118,127,133,154))
distance.matrix.1locus(mygenotypes,usatnt=3)
Run the code above in your browser using DataLab