make.admix.pie.plot: Make admixture pie plot

View source: R/plot.output.R

make.admix.pie.plotR Documentation

Make admixture pie plot

Description

make.structure.plot makes a map of pie plots showing admixture proportions across layers.

Usage

make.admix.pie.plot(
  admix.proportions,
  coords,
  layer.colors = NULL,
  radii = 2.7,
  add = FALSE,
  x.lim = NULL,
  y.lim = NULL,
  mar = c(2, 2, 2, 2)
)

Arguments

admix.proportions

A matrix of admixture proportions, with one row per sample and one column per layer.

coords

matrix of sample coordinates, with one row per sample and two columns giving (respectively) the X and Y plotting coordinates.

layer.colors

A vector of colors to be used in plotting results for different layers. Users must specify one color per layer. If NULL, the plot will use a pre-specified vector of colors.

radii

A vector of numeric values giving the radii to be used in plotting admixture pie plots. If the number of values specified is smaller than the number of samples, radii values will be recycled across samples. The default is 2.7.

add

A logical value indicating whether to add the pie plots to an existing plot. Default is FALSE.

x.lim

A vector giving the x limits of the plot. The default value is NULL, which indicates that the range of values given in the first column of coords should be used.

y.lim

A vector giving the y limits of the plot. The default value is NULL, which indicates that the range of values given in the second column of coords should be used.

mar

A vector giving the number of lines of margin specified for the four sides of the plotting window (passed to par). Default value, which is only used if add=FALSE, is c(2,2,2,2).

Details

This function takes the output from a conStruct analysis and makes a map of pie plots showing admixture proportions across layers, where each sample is represented as a pie chart, and the proportion of the pie of each color represent that sample's admixture proportion in that layer.

Value

This function has only invisible return values.

Examples

	
# make admixture pie plot
make.admix.pie.plot(admix.proportions = admix.props,coords = coords)


conStruct documentation built on March 31, 2023, 10:13 p.m.