Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gl.plot

Plotting genlight object as a smear plot (loci by individuals color coded for scores of 0, 1, 2 and NA)


Description

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.

Usage

gl.plot(
  x,
  labels = FALSE,
  indlabels = indNames(x),
  col = NULL,
  legend = TRUE,
  posi = "bottomleft",
  bg = rgb(1, 1, 1, 0.5),
  verbose = NULL,
  ...
)

Arguments

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.

Examples

gl.plot(bandicoot.gl[1:30,])
gl.plot(bandicoot.gl[1:30,])
gl.plot(bandicoot.gl[1:10,],labels=TRUE)

dartR

Importing and Analysing SNP and Silicodart Data Generated by Genome-Wide Restriction Fragment Analysis

v1.9.6
GPL-2
Authors
Bernd Gruber [aut, cre], Arthur Georges [aut], Jose L. Mijangos [aut], Peter J. Unmack [ctb], Oliver Berry [ctb], Lindsay V. Clark [ctb], Floriaan Devloo-Delva [ctb]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.