pairwiseDist {MSCsimtester} | R Documentation |
Compute and plot sample and theoretical pairwise distance densities.
Description
Computes theoretical pairwise distance densities under the MSC on a species tree and empirical pairwise distances from gene trees in a sample. A histogram of empirical values is plotted over the theoretical pdf.
Usage
pairwiseDist(
stree,
popSizes,
gtSample,
taxon1,
taxon2,
numSteps = 1000,
tailProb = 0.01,
numBreaks = 40
)
Arguments
stree |
An object of class |
popSizes |
A vector containing constant population sizes, one entry for each
edge/population in the species tree, for a haploid population. Sizes should be doubled for diploids.
If |
gtSample |
An object of class |
taxon1 |
A string specifying one taxon on |
taxon2 |
A string specifying a second taxon on |
numSteps |
A positive integer number of values to be computed for
graphing the theoretical pairwise distance density. Default is |
tailProb |
A cutoff value, between 0 and 1, for the theoretical density, with a default of 0.01. |
numBreaks |
Number of breaks in histogram. Default is |
Value
A list of items needed for Anderson-Darling test(s), for use by ADtest
,
returned invisibly. See function code for more details.
See Also
plotEdgeOrder
, plotPops
, ADtest
Examples
stree=read.tree(text="((((a:10000,b:10000):10000,c:20000):10000,d:30000):10000,e:40000);")
pops=c(15000,25000,10000,1,1,1,1,1,12000)
gts=read.tree(file=system.file("extdata","genetreeSample",package="MSCsimtester"))
pairwiseDist(stree,pops,gts,"a","b")