areCondSatisfied: areCondSatisfied

Description Usage Arguments Value Examples

View source: R/areCondSatisfied.R

Description

Determine whether conditions are satisfied for two species to be convergently evolved at a given position.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
areCondSatisfied(
  tree,
  phydat,
  spe1,
  spe2,
  pos,
  type = c("abs", "score"),
  threshold = NA,
  simMatrix = BLOSUM62
)

Arguments

tree

A phylogenetic tree

phydat

An object of class phydat

spe1

The name of species 1

spe2

The name of species 2

pos

The position at which to evaluate if conditions are satisfied

type

Type of analysis: 'abs' for basic model or 'score' for by convergence score model (AA position with ref to species 1; others are aligned to species 1)

threshold

score threshold above which a position is considered convergent

simMatrix

similarity matrix to quantify similarity between amino acids (default is BLOSUM62)

Value

TRUE if conditions are satisfied; FALSE if they are not.

Examples

1
2
3
4
5
6
7
## Not run: 
data(BLOSUM62)
areCondSatisfied(smallTree, primates, "Human", "Chimp", pos=1, type="abs", 1, BLOSUM62)
areCondSatisfied(tree, primates, "Human", "Chimp", pos=2, type="score", threshold=0, BLOSUM62)
areCondSatisfied(tree, primates, "Human", "Chimp", pos=3, type="score", threshold=0, BLOSUM62)

## End(Not run)

dinaIssakova/rgenesconverged documentation built on Jan. 7, 2020, 4:25 p.m.