strataG (version 2.4.905)

sequenceLikelihoods: Sequence Likelihoods

Description

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

Usage

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).

Value

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

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.

Examples

Run this code
# NOT RUN {
data(dolph.haps)

sequenceLikelihoods(dolph.haps)

# }

Run the code above in your browser using DataCamp Workspace