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

compoplot

Genotype composition plot


Description

The compoplot uses a barplot to represent the group assignment probability of individuals to several groups. It is a generic with methods for the following objects:

Usage

compoplot(x, ...)

## S3 method for class 'matrix'
compoplot(
  x,
  col.pal = funky,
  border = NA,
  subset = NULL,
  show.lab = FALSE,
  lab = rownames(x),
  legend = TRUE,
  txt.leg = colnames(x),
  n.col = 4,
  posi = NULL,
  cleg = 0.8,
  bg = transp("white"),
  ...
)

## S3 method for class 'dapc'
compoplot(x, only.grp = NULL, border = NA, ...)

## S3 method for class 'snapclust'
compoplot(x, border = NA, ...)

Arguments

x

an object to be used for plotting (see description)

...

further arguments to be passed to barplot

col.pal

a color palette to be used for the groups; defaults to funky

border

a color for the border of the barplot; use NA to indicate no border.

subset

a subset of individuals to retain

show.lab

a logical indicating if individual labels should be displayed

lab

a vector of individual labels; if NULL, row.names of the matrix are used

legend

a logical indicating whether a legend should be provided for the colors

txt.leg

a character vector to be used for the legend

n.col

the number of columns to be used for the legend

posi

the position of the legend

cleg

a size factor for the legend

bg

the background to be used for the legend

only.grp

a subset of groups to retain

Details

  • matrix: a matrix with individuals in row and genetic clusters in column, each entry being an assignment probability of the corresponding individual to the corresponding group

  • dapc: the output of the dapc function; in this case, group assignments are based upon geometric criteria in the discriminant space

  • snapclust: the output of the snapclust function; in this case, group assignments are based upon the likelihood of genotypes belonging to their groups

Author(s)

Thibaut Jombart thibautjombart@gmail.com


adegenet

Exploratory Analysis of Genetic and Genomic Data

v2.1.3
GPL (>= 2)
Authors
Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cre] (<https://orcid.org/0000-0003-1458-7108>), Caitlin Collins [ctb], Roman Lustrik [ctb], Marie-Pauline Beugin [ctb], Brian J. Knaus [ctb], Peter Solymos [ctb], Vladimir Mikryukov [ctb], Klaus Schliep [ctb], Tiago Maié [ctb], Libor Morkovsky [ctb], Ismail Ahmed [ctb], Anne Cori [ctb], Federico Calboli [ctb], RJ Ewing [ctb], Frédéric Michaud [ctb], Rebecca DeCamp [ctb], Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)
Initial release

We don't support your browser anymore

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