Learn R Programming

CAnD (version 1.4.0)

barPlotAncest: Create a Barplot of Ancestry Proportion Estimates for Every Sample and a Given Chromosome or Chromosomal Region

Description

Plots ancestry proportion estimates for each sample

Usage

barPlotAncest(set, order = TRUE, title = "", xlab = "Sample", ylab = "Ancestry Proportion", ...)

Arguments

set
A data.frame with columns of the proportion ancestry for a given chromosome or chromosomal region, and one row per sample (bar).
order
A logical argument determining whether the samples should be ordered in increasing proportion of the first ancestry. Default is TRUE.
title
A character string containing the title of the plot. Default is "", a blank title.
xlab
A character vector with the label for the x-axis on the plot. Default is Sample.
ylab
A character vector holding the label for the y-axis on the plot. Default is Ancestry Proportion.
...
Further arguments to be passed to the plotting methods, such as graphical parameters.

Value

Creates a plot.

Details

Creates a barplot of ancestry proportions for each sample for a given chromosome or chromosomal region.

Examples

Run this code
data(ancestries)
chr1 <- ancestries[,c("Euro_1","Afr_1","Asian_1")]
#barPlotAncest(chr1,title="Chr 1 Ancestry Proportions")

Run the code above in your browser using DataLab