plotTreeBar: Generate a barplot of a Structure or Admixture run.

Description Usage Arguments Examples

Description

Generate a barplot of a Structure or Admixture run.

Usage

1
plotTreeBar(x, facet = TRUE, dendro = NULL, cut = NULL)

Arguments

x

a single cluster run object of type struct or admix or Q-matrix

facet

whether or not to split the barplot by cluster. This is recommended.

dendro

an object of class 'hclust' (defaults to hclust with average linkage)

cut

an integer vector output by 'cutree' (defaults to cutree k=ncols(Q))

Examples

1
2
3
4
5
6
7
8
9
# Read file using K = 6 and plot results
k6_data <- exampleStructure("barplot")
# our facetted structure plot with tree
plotTreeBar(k6_data)
# standard 'structure' bar plot with tree
plotTreeBar(k6_data, facet = FALSE)
# Admix example
k3_data <- exampleAdmixture()[[3]]
plotTreeBar(k3_data)

Example output

TableGrob (2 x 1) "arrange": 2 grobs
  z     cells    name           grob
1 1 (1-1,1-1) arrange gtable[layout]
2 2 (2-2,1-1) arrange gtable[layout]
TableGrob (2 x 1) "arrange": 2 grobs
  z     cells    name           grob
1 1 (1-1,1-1) arrange gtable[layout]
2 2 (2-2,1-1) arrange gtable[layout]
TableGrob (2 x 1) "arrange": 2 grobs
  z     cells    name           grob
1 1 (1-1,1-1) arrange gtable[layout]
2 2 (2-2,1-1) arrange gtable[layout]

starmie documentation built on May 1, 2019, 8:01 p.m.