Learn R Programming

TreeSearch (version 0.2.2)

IWScoreMorphy: Profile Parsimony Score

Description

Calculate a tree's Profile Parsimony score with a given dataset, after Faith and Trueman (2001)

Usage

IWScoreMorphy(parent, child, dataset, concavity = 4,
  minSteps = attr(dataset, "min.steps"), ...)

ProfileScore(tree, dataset)

ProfileScoreMorphy(parent, child, dataset, ...)

ProfileInitMorphy(dataset)

ProfileDestroyMorphy(dataset)

Arguments

parent

the first column of the edge matrix of a tree of class phylo, i.e. tree$edge[, 1]

child

the second column of the edge matrix of a tree of class phylo, i.e. tree$edge[, 2]

dataset

Dataset of class phyDat. The dataset should have been prepared using dataset <- PrepareDataProfile(dataset); if this step has not been completed, the dataset will be (time-consumingly) prepared within the function. In subsidiary functions, the dataset will have been initialized using ProfileInitMorphy, must be destroyed using ProfileDestroyMorphy.

concavity

A numeric value to use as the concavity constant (`k`) in implied weighting.

minSteps

Integer vector specifying the minimum number of steps possible for each character in `dataset`, perhaps calculated using MinimumSteps.

unused; allows additional parameters specified within … to be received by the function without throwing an error.

tree

A tree of class phylo.

Value

Zero minus the profile score (because the optimization algorithm treats smaller numbers as better)

Functions

  • IWScoreMorphy: Scorer for initialized dataset.

  • ProfileScoreMorphy: Scorer for initialized dataset.

  • ProfileInitMorphy: Initialize dataset by adding morphyObjs.

  • ProfileDestroyMorphy: Free memory from morphyObjs initialized by ProfileScoreMorphy.

References

Faith2001TreeSearch

Examples

Run this code
# NOT RUN {
  data(referenceTree)
  data(congreveLamsdellMatrices)
  # In actual use, the dataset should be prepared with a much higher
  # precision: try 1e+06?
  # Of course, gaining higher precision takes substantially longer.
  dataset <- PrepareDataProfile(congreveLamsdellMatrices[[42]], precision=1e+03)
  ProfileScore(referenceTree, dataset)

# }

Run the code above in your browser using DataLab