make.structure.plot {conStruct} | R Documentation |
Make STRUCTURE output plot
Description
make.structure.plot
makes a STRUCTURE-style plot from the output from a
conStruct analysis.
Usage
make.structure.plot(
admix.proportions,
mar = c(2, 4, 2, 2),
sample.order = NULL,
layer.order = NULL,
sample.names = NULL,
sort.by = NULL,
layer.colors = NULL
)
Arguments
admix.proportions |
A |
mar |
A |
sample.order |
A |
layer.order |
A |
sample.names |
Vector of names to be plotted under each sample's
admixture proportion bar plot. The index of a sample's name
should be the same as the index of the sample's row in
|
sort.by |
An |
layer.colors |
A |
Details
This function takes the output from a conStruct analysis and makes a STRUCTURE-style plot, where each sample is represented as a stacked bar plot, and the length of the bar plot segments of each color represent that sample's admixture proportion in that layer.
Value
This function has only invisible return values.
Examples
# make STRUCTURE-style plot
make.structure.plot(admix.proportions = admix.props)
# make STRUCTURE-style plot, sorted by membership in layer 1
make.structure.plot(admix.proportions = admix.props,sort.by=1)