plot.allele.freq | R Documentation |
For each locus a plot is constructed in a new window. Allele frequencies are represented by dots of varying diameter. Allele codes are indicated on the x axis and populations on the y axis
plot.allele.freq(data, LocusNames,Plogbase=20,textlegend=0.8,freqlegend=c(0.1,0.15,0.2,0.5,0.75,1),
psize=7,poptext=0.5,allelesize=1,xaxispos=0,yplotlim=-3,alleleangle=45,
pdfout=FALSE,pdfname="out.pdf")
data |
A data.frame with rows corresponding to individuals and populations on top of each other. The first column has the population codes, the 2nd the individual codes. The following columns have the allele codes, in integers, using three or two digits (but be consistent!). Missing data is represented by the value 999. There is no header in this file |
LocusNames |
a character vector with the names of loci |
Plogbase |
used to control the points cex argument to plot allele frequencies as points, as in cex=log(allelefreq+1,base=Plogbase)*psize) |
textlegend |
controls the cex argument for the legend text size |
freqlegend |
a numeric vector with the allele frequencies used in the legend |
poptext |
controls the cex argument for the font size of population names in the y-axis. Defaults to 0.5 |
pcol |
color of points for each population takes a vector of with length equal to the number of populations. Defaults to black |
allelesize |
controls the cex argument for the font size of allele names in the x-axis |
xaxispos |
the pos argument for horizontal axis in the plot, see help(axis) |
yplotlim |
The ylim argument of the plot, see help(plot.default) |
alleleangle |
text rotation for allele names, in degrees, defaults to 45 |
pdfout |
logical to control if a pdf with the plot should be written, defaults to FALSE. Currently the function to export pdf is not working in RStudio |
psize |
Used to control the points cex argument to plot allele frequencies as points, as in cex=log(allelefreq+1,base=Plogbase)*psize |
pdfname |
Name for the output pdf file to write the plots if pdfout is TRUE, defaults to out.pdf |
Depending on the number of populations and alleles in the data set, different combinations of psize and Plogbase arguments should be tried
As many different plot windows as there are loci in the data file, allowing a visualization of allele frequencies at each locus across populations
Filipe Alberto, Department of Biological Sciences, University of Wisconsin-Milwaukee
Alberto F, Arnaud-Haond S, Duarte CM, Serrao EA (in press) Genetic diversity of a clonal angiosperm near its range limit: the case of Cymodocea nodosa in the Canary Islands. Marine Ecology Progress Series
plot.allele.freq
, allele.genotype.plot
data(Exdata)
allele.freq.plot(Exdata,LocusNames=paste("L",1:8,sep="."))
{ dplot }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.