probOfNSitesByChance: Calculate probability of N chance 'convergent' sites

Description Usage Arguments Value Examples

View source: R/probByChance.R

Description

Calculate the probability that n sites between the two species will satisfy the conditions of convergent evolution by chance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
probOfNSitesByChance(
  tree,
  phydat,
  spe1,
  spe2,
  m,
  n,
  p = (1/20),
  t = NA,
  type = c("abs", "score")
)

Arguments

tree

A phylogenetic tree

phydat

PhyDat object containing corresponding alignment information

spe1

The name of species 1

spe2

The name of species 2

m

The length of the genes. (Must of equal length)

n

The number of potential convergent sites

p

The fraction of the amino acid at the target position in the evaluated genome. (Default is 1/20)

t

threshold for score option

type

Type of analysis: 'abs' for basic model or 'score' for by convergence score model

Value

Scaled likelihood that the amino acids satisfying the conditions of convergent evolution is by chance.

Examples

1
2
3
4
## Not run: 
probOfNSitesByChance(tree, "Human", "Chimp", 20, 2)

## End(Not run)

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