locator.haplo {haplo.score} | R Documentation |
Much like the Splus locator() is used to find x-y coordinates on a plot, locator.haplo() finds all x-y coordinates that are clicked on by a user, and then prints haplotypes at the chosen positions.
locator.haplo(obj)
obj |
An object (of class haplo.score) which contains the analysis results that are returned from the function haplo.score. |
After plotting the results in obj, as from plot(obj), the function locator.haplo is used to place on the plot the text strings for haplotypes of interest. After the function call (e.g., locator.haplo(obj)), the user can click, with the left mouse button, on as many points in the plot as desired. Then, clicking with the middle mouse button will cause the haplotypes to be printed on the plot. The format of a haplotype is "a:b:c", where a, b, and c are alleles, and the separator ":" is used to separate alleles on a haplotype. The algorithm chooses the closest point that the user clicks on, and prints the haplotype either above the point (for points on the lower-half of the plot) or below the point (for points in the upper-half of the plot).
List with the following components:
x.coord |
Vector of x-coordinates. |
y.coord |
Vector of y-coordinates. |
hap.txt |
Vector of character strings for haplotypes. |
haplo.score
## Don't run: save <- haplo.score(y, geno, trait.type = "binomial") plot(save) locator.haplo(save) ## End Don't run