Skip to contents

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 = colorRampPalette(c("royalblue3", "firebrick1"))(3),
  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].

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

See also

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

Author

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

Examples

gl.smearplot(testset.gl,ind_labels=FALSE)
#>   Processing genlight object with SNP data
#> Starting gl.smearplot 
#> 
#> Warning: Removed 7868 rows containing missing values (`geom_raster()`).

#> Completed: gl.smearplot 
#> 
gl.smearplot(testset.gs[1:10,],ind_labels=TRUE)
#>   Processing genlight object with Presence/Absence (SilicoDArT) data
#> Starting gl.smearplot 
#> 
#> Warning: Removed 108 rows containing missing values (`geom_raster()`).

#> Completed: gl.smearplot 
#>