gdist: Genetic Distance

Description Usage Arguments Details Value See Also

View source: R/unfazeD.R

Description

Pairwise estimation of relatedness parameters for polyclonal multiallelic samples.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
gdist(
  dat,
  afreq,
  coi,
  nmmax,
  nr = 100,
  rval = NULL,
  reval = NULL,
  FUNnm = NULL,
  equalr = FALSE,
  split = "[[:space:][:punct:]]+",
  ...
)

Arguments

dat

data containing sample genotypes. Various formats allowed.

afreq

a list of allele frequencies. Each element of the list corresponds to a locus.

coi

a vector indicating complexity of infection for each sample.

nmmax

the maximum number of related strains in a pair of samples.

nr

an integer value for the resolution of the grid (nr - 1 values between 0 and 1), over which the likelihood will be calculated. Ignored if non-null reval is provided.

rval

{r} values for the grid or for evaluation when equalr is TRUE. If NULL, will be evenly spaced between 0 and 1 and interval 1/nr.

reval

the grid of {r} combinations, over which the likelihood will be calculated. A matrix where each column represents a single combination.

FUNnm

potentially a function to select nm for each pair of samples.

equalr

a logical value. If TRUE, only equal values of r for different pairs of strains are evaluated.

split

the allele separator character string if genotypes are provided as character strings.

...

additional arguments for FUNnm. #*** take out if FUNnm is out

Details

To be added: data formats that can be processed, formats to be returned.

Value

A lower triangular distance/relatedness matrix in a type of shaped list. Each pairwise distance contains a scalar, a vector, or a matrix of {r} estimates. Simple matrix (of type double) can be returned if all the elements are of length 1.

See Also

gdistPair for genetic relatedness between two samples with an option of returning log-likelihood.


innager/unfazeD documentation built on June 26, 2021, 6:01 p.m.