Calculates summary statistics useful for analyzing DNA.
## S3 method for class 'DNAmat_class' summary(DNAmat)
DNAmat | matrix; either a single-nucleotide polymorphism matrix or a segregating sites matrix of class 'DNAmat_class'. |
---|
List containing the following components:
The site frequency spectrum
Watterson's estimator.
The pairwise difference estimator.
Tajima's D
# Using the function simDNAseq: summary(simDNAseq(n = 12, seqLen = 20, mutRate = 5, popType = "varPop", expRate = 1.5))#> Summary statistics: #> Site frequency spectrum: 11 2 2 0 0 0 0 0 0 0 0 #> Estimators of the scaled mutation rate: #> Watterson's estimator: 4.967089 #> Pairwise difference estimator: 3.257576 #> Tajima's D: -1.477688# Creating a segregating sites matrix by hand: DNAmat <- matrix(c(0,1,0,0, 0,1,0,1, 0,0,0,0, 0,0,0,0), 4,4, byrow=TRUE) class(DNAmat) <- "DNAmat_class" summary(DNAmat)#> Summary statistics: #> Site frequency spectrum: 1 1 0 #> Estimators of the scaled mutation rate: #> Watterson's estimator: 1.090909 #> Pairwise difference estimator: 1.166667 #> Tajima's D: 0.5915801