overfitSS | R Documentation |
Testing the robustness of search.shift
(Castiglione et al. 2018) results to sampling effects and
phylogenetic uncertainty.
overfitSS(RR,oveRR,node=NULL,state=NULL)
RR |
an object produced by |
oveRR |
an object produced by applying |
node , state |
arguments passed to |
The function returns a 'RRphyloList' object containing:
$SSclade.list a 'RRphyloList' including the results of each
search.shift - clade condition
performed within overfitSS
.
$SSsparse.list a 'RRphyloList' including the results of each
search.shift - sparse condition
performed within overfitSS
.
$shift.results a list including results for
search.shift
performed under clade
and sparse
conditions. If one or more node
s are specified, the
$clade$single.clades
object contains the proportion of simulations
producing significant and positive or significant and negative rate shifts
for each single node, either compared to the rest of the tree
($singles
) or to the rest of the tree after removing other shifting
clades ($no.others
). The object $clade$all.clades.together
includes the same proportions obtained by testing all the specified clades
as a whole (i.e. considering them as evolving under a single rate regime).
For each node the proportion of tested trees (i.e. where the clade identity
was preserved) is also indicated. If a state
vector is supplied, the
object $sparse
contains the percentage of simulations producing
significant p-value separated by shift sign ($p.states
).
The output always has an attribute "Call" which returns an unevaluated call to the function.
Silvia Castiglione, Carmela Serio, Giorgia Girardi, Pasquale Raia
Castiglione, S., Tesone, G., Piccolo, M., Melchionna, M., Mondanaro, A., Serio, C., Di Febbraro, M., & Raia, P. (2018). A new method for testing evolutionary rate variation and shifts in phenotypic evolution. Methods in Ecology and Evolution, 9: 974-983.doi:10.1111/2041-210X.12954
overfitSS
vignette ;
search.shift
vignette ;
Alternative-trees
vignette
## Not run:
cc<- 2/parallel::detectCores()
# load the RRphylo example dataset including Ornithodirans tree and data
data("DataOrnithodirans")
DataOrnithodirans$treedino->treedino
log(DataOrnithodirans$massdino)->massdino
DataOrnithodirans$statedino->statedino
# peform RRphylo on Ornithodirans tree and data
RRphylo(tree=treedino,y=massdino,clus=cc)->dinoRates
# perform search.shift under both "clade" and "sparse" condition
search.shift(RR=dinoRates, status.type= "clade")->SSauto
search.shift(RR=dinoRates, status.type= "sparse", state=statedino)->SSstate
## overfitSS routine
# generate a list of subsampled and swapped phylogenies, setting as categories/node
# the state/node under testing
treedino.list<-resampleTree(dinoRates$tree,s = 0.25,categories=statedino,
node=rownames(SSauto$single.clades),swap.si = 0.1,swap.si2 = 0.1,nsim=10)
# test the robustness of search.shift
ofRRdino<-overfitRR(RR = dinoRates,y=massdino,phylo.list=treedino.list,clus=cc)
ofSS<-overfitSS(RR = dinoRates,oveRR = ofRRdino,state=statedino,node=rownames(SSauto$single.clades))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.