sequenceLikelihoods: Sequence Likelihoods

Description Usage Arguments Details Value Author(s) Examples

View source: R/sequenceLikelihoods.R

Description

Calculate likelihood of each sequence based on gamma distribution of pairwise distances.

Usage

1
2
3
4
5
6
7
8
9
sequenceLikelihoods(
  x,
  model = "N",
  pairwise.deletion = FALSE,
  n = NULL,
  plot = TRUE,
  simplify = TRUE,
  ...
)

Arguments

x

a DNAbin object.

model

a character string specifying the evolutionary model to be used. Passed to dist.dna.

pairwise.deletion

a logical indicating whether to delete the sites with missing data in a pairwise way. Passed to dist.dna.

n

number of sequences with lowest delta(log-likelihoods) to plot. Defaults to all sequences Set to 0 to supress plotting.

plot

generate a plot of top n most unlikely sequences.

simplify

if there is a single locus, return result in a simplified form? If FALSE a list will be returned wth one element per locus.

...

arguments passed from other functions (ignored).

Details

Fits a Gamma distribution to the pairwise distances of sequences and calculates the log-likelihood for each (sum of all pairwise log-likelihoods for that sequence). Sequences that are extremely different from all others will have low log-likelihoods. Values returned as delta(log-likelhoods) = difference of log-likelihoods from maximum observed values.

Value

vector of delta(log-Likelihoods) for each sequence, sorted from smallest to largest, and a plot of their distributions.

Author(s)

Eric Archer eric.archer@noaa.gov

Examples

1
2
3

strataG documentation built on Feb. 28, 2020, 9:07 a.m.