gl.smearplot: Smear plot of SNP or presence/absence (SilicoDArT) data

View source: R/gl.smearplot.r

gl.smearplotR Documentation

Smear plot of SNP or presence/absence (SilicoDArT) data

Description

Each locus is color coded for scores of 0, 1, 2 and NA for SNP data and 0, 1 and NA for presence/absence (SilicoDArT) data. Individual labels can be added and individuals can be grouped by population.

Plot may become cluttered if ind_labels If there are too many individuals, it is best to use ind_labels_size = 0.

Usage

gl.smearplot(
  x,
  ind_labels = FALSE,
  group_pop = FALSE,
  ind_labels_size = 10,
  plot_colors = NULL,
  posi = "bottom",
  save2tmp = FALSE,
  verbose = NULL
)

Arguments

x

Name of the genlight object containing the SNP or presence/absence (SilicoDArT) data [required].

ind_labels

If TRUE, individuals are labelled with indNames(x) [default FALSE].

group_pop

If ind_labels is TRUE, group by population [default TRUE].

ind_labels_size

Size of the individual labels [default 10].

plot_colors

Vector with four color names for homozygotes for the reference allele, heterozygotes, homozygotes for the alternative allele and for missing values (NA), e.g. four_colours [default NULL]. Can be set to "hetonly", which defines colors to only show heterozygotes in the genlight object

posi

Position of the legend: “left”, “top”, “right”, “bottom” or 'none' [default = 'bottom'].

save2tmp

If TRUE, saves plot to the session temporary directory (tempdir) [default FALSE].

verbose

Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default NULL].

Value

Returns unaltered genlight object

Author(s)

Custodian: Luis Mijangos – Post to https://groups.google.com/d/forum/dartr

See Also

Other Exploration/visualisation functions: gl.pcoa.plot(), gl.select.colors(), gl.select.shapes()

Examples

gl.smearplot(testset.gl,ind_labels=FALSE)
gl.smearplot(testset.gs[1:10,],ind_labels=TRUE)

green-striped-gecko/dartR documentation built on Sept. 7, 2024, 4:15 a.m.