This function will return all unique genotypes for a given locus (ignoring allele
order, but taking copy number into account) and return those genotypes as well
as an index indicating which genotype(s) each individual has. This is a generic function
with methods for "genambig"
objects and for arrays. The array
method is primarily intended for internal use with meandistance.matrix2
,
processing the output of genotypeProbs
.
genIndex(object, locus)
A list with two elements:
A list, where each element in the list is a vector indicating a unique genotype that was found.
For "genambig"
objects, an integer vector, with one value per sample.
This is the index of that sample's genotype in uniquegen
. For arrays, a list with
one element per sample. Each element is a vector of indices of that sample's possible
genotypes in uniquegen
, in the same order as in the genotypeProbs
output.
Typically, a "genambig"
object. A two-dimentional list (array) can also be
used here, where samples are in the first dimension and loci in the second dimension
and each element of the list is output from genotypeProbs
.
A character string or integer indicating which locus to process.
Lindsay V. Clark
meandistance.matrix
uses the "genambig"
method internally.
.unal1loc
, assignClones
data(simgen)
genIndex(simgen, 1)
Run the code above in your browser using DataLab