Description Usage Arguments Details Examples
View source: R/plot_DNAmat_class.R
Plots the site frequency spectrum.
1 2 3 |
DNAmat |
matrix; either a single-nucleotide polymorphism matrix or a segregating
sites matrix of class 'DNAmat_class'. See |
xlab |
a title for the x axis. Is by default "Index i". See |
ylab |
a title for the y axis. Is by default "Number of i-tons". See |
main |
an overall title for the plot. Is by default "Site frequency spectrum". See |
... |
arguments passed on from |
The terminology "Number of i-tons" corresponds to the i'th entry in the site
frequency spectrum. See SFS
for further explanation.
1 2 3 4 5 6 7 8 9 10 11 | # Using the function simDNAseq:
plot(simDNAseq(n = 8, seqLen = 20, mutRate = 5,
popType = "varPop", expRate = 1.5), col="red")
# Creating a segregating sites matrix by hand:
SegSitesMat <- matrix(sample(x=c(0, 1), size=26*12,
replace=TRUE, prob=c(0.9, 0.1)),
nrow=12, ncol=26, byrow=TRUE)
class(SegSitesMat) <- "DNAmat_class"
plot(SegSitesMat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.