Learn R Programming

RRphylo (version 3.0.0)

overfitSS: Testing search.shift overfit

Description

Testing the robustness of search.shift (Castiglione et al. 2018) results to sampling effects and phylogenetic uncertainty.

Usage

overfitSS(RR,oveRR,node=NULL,state=NULL)

Value

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 nodes 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.

Arguments

RR

an object produced by RRphylo.

oveRR

an object produced by applying overfitRR on the object provided to the function as RR.

node, state

arguments passed to search.shift. Arguments node and state can be specified at the same time.

Author

Silvia Castiglione, Carmela Serio, Giorgia Girardi, Pasquale Raia

References

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

See Also

Examples

Run this code
if (FALSE) {
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))

}

Run the code above in your browser using DataLab