Identify topologically distinct rate shift configurations
that were sampled with BAMM, and assign each sample in the
posterior to one of the distinct shift configurations.
The expected number of rate shifts under the
prior.
threshold
Threshold value for marginal posterior-to-prior odds
ratios, used to identify branches with elevated shift probabilities
relative to prior (core vs non-core shifts).
...
Other arguments to distinctShiftConfigurations (possibly
deprecated args).
Details
See Rabosky et al (2014) and the BAMM project website for
details on the nature of distinct shift configurations and especially
the distinction between "core" and "non-core" rate shifts. Note that
branches with elevated marginal posterior probabilities relative to
the prior (marginal odds ratios) cannot be claimed to have
"significant" evidence for a rate shift on the basis of this evidence
alone.
Value
An object of class bammshifts. This is a list with the
following components:
marg.probs A list of the marginal probability of a shift
occurring at each node of the phylogeny for each distinct rate
shift configuration.
marginal_odd_ratio Marginal posterior-to-prior odds ratios
for one or more rate shifts an a given branch.
shifts A list of the set of shift nodes for each distinct
rate configuration.
samplesets A list of sample indices that reduce to each of
the unique shift sets.
frequency A vector of frequencies of each distinct shift
configuration.
coreshifts A vector of node numbers corresponding to the
core shifts. All of these nodes have a marginal odds ratio of
at least threshold supporting a rate shift.
threshold A single numeric value giving the marginal
posterior:prior odds ratio threshold used during enumeration
of distinct shift configurations
Results are sorted by frequency:
$frequency[1] gives the most common shift configuration sampled.
$shifts[[1]] gives the corresponding node indices for that
configuration.
$samplesets[[1]] gives the indices of samples with this configuration.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(BAMMtools)
Loading required package: ape
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/BAMMtools/distinctShiftConfigurations.Rd_%03d_medium.png", width=480, height=480)
> ### Name: distinctShiftConfigurations
> ### Title: Identify distinct rate shift configurations
> ### Aliases: distinctShiftConfigurations
>
> ### ** Examples
>
> data(whales, events.whales)
> ed <- getEventData(whales, events.whales, burnin=0.25, nsamples=500)
Processing event data from data.frame
Discarded as burnin: GENERATIONS < 2495000
Analyzing 500 samples from posterior
Setting recursive sequence on tree...
Done with recursive sequence
>
> sc <- distinctShiftConfigurations(ed, expectedNumberOfShifts = 1,
+ threshold = 5)
>
> plot(sc, ed, rank=1)
>
>
>
>
>
> dev.off()
null device
1
>