match.lnL.to.trees: Match the likelihoods returned on a subset of trees for...

Description Usage Arguments Details Value Author(s) References See Also

View source: R/match.lnL.to.trees.R

Description

This function reads in tree likelihoods for a series of loci exported from gen.RAD.loci.datasets and matches those up to the trees originally created. Because gen.RAD.loci.datasets only exports trees that include the taxa in each locus exported, these likelihoods are matched up to all trees in the original dataset that are compatible with each pruned tree.

Usage

1
2
3
4
5
match.lnL.to.trees(directory = "getwd()",
                   lnLprefix = "RAxML_info.",
		   lnLsuffix = ".lnL",
                   treeIndexFile = "tree.index.lines.txt",
		   locus.names = NULL, ...)

Arguments

directory

path for the directory in which the 'info' and 'lnL' files were saved by RAxML

lnLprefix

prefix for the RAxML info files; generally should not be changed, unless RAxML changes this down the line

lnLsuffix

suffix appended to the files; this is currently should not be changed, as it is hard-coded in gen.RAD.loci.datasets

treeIndexFile

names of the tree index file; again, this file name is hard-coded in gen.RAD.loci.datasets

locus.names

a vector of locus names, if you want to subset by loci at the outset of analysis; typically, subsetting is just done by the function

...

additional parameters, not currently passed along to anybody

Details

The idea behind this function is that we want to let loci vote only on trees they are qualified to vote on. In an earlier implementation, each locus was forced to vote on every tree, unpruned, and the results were simply noisy. Here, we take a set of trees and, for each locus out a treeset pruned to just that taxon set for each taxon set. We then calculate the site likelihoods based on those treesets.

Every locus is, in fact, evaluating every tree, but because many trees become topologically identical after pruning, we have to set an equal score to trees that are topologically identical... and which trees are topologically identical differs among loci.

Value

A matrix of likelihoods, with loci as rows and the original trees as columns

Author(s)

Andrew Hipp

References

Hipp A.L., Eaton D.A.R., Cavender-Bares J., Fitzek E., Nipper R. & Manos P.S. (Accepted pending revision). A framework phylogeny of the American oak clade based on sequenced RAD data. PLoS ONE.

See Also

gen.RAD.loci.datasets, plot.rankedPartitionedRAD, rank.partitionedRAD


RADami documentation built on May 30, 2017, 8:23 a.m.