Plotting genlight object as a smear plot (loci by individuals color coded for scores of 0, 1, 2 and NA)
This function is based on the glPlot function from adegenet. It adds the option to put labels on the individuals and scales them accordingly. If there are too many individuals, it is best to use labels=FALSE.
For arguments please refer to the original adegenet function ?glPlot.
gl.plot( x, labels = FALSE, indlabels = indNames(x), col = NULL, legend = TRUE, posi = "bottomleft", bg = rgb(1, 1, 1, 0.5), verbose = NULL, ... )
x |
– a genlight object [required] |
labels |
– if TRUE, individual labels are added |
indlabels |
– labels for individuals [default = first 8 letters from indNames] |
col |
– optional color vector (see ?glPlot) [default NULL] |
legend |
– if TRUE, a legend will be added [default = TRUE] |
posi |
– position of the legend [default = "bottomleft"] |
bg |
– background color of the legend [default transparent white] |
verbose |
– verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default NULL] |
... |
— additional arguments passed to glPlot function. |
gl.plot(bandicoot.gl[1:30,]) gl.plot(bandicoot.gl[1:30,]) gl.plot(bandicoot.gl[1:10,],labels=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.