pwp2allelicCov: Convert pairwise pi to allelic covariance

View source: R/format.data.R

pwp2allelicCovR Documentation

Convert pairwise pi to allelic covariance

Description

pwp2allelicCov converts a measures of pairwise pi to allelic covariance

Usage

pwp2allelicCov(pi)

Arguments

pi

A measurement of nucleotide diversity between a pair of samples; it is the proportion of sites at which the samples differ, out of the total number of loci in the sample. Can be a single value, a vector, or a matrix.

Details

This function takes measurements of pairwise pi and returns the allelic covariance, which can then be used in a BEDASSLE analysis.

This function takes a measurement or set of measurements of pairwise pi between samples and converts it to a an allelic covariance, which can then be used to run a run.bedassle analysis. The pi argument specified will most commonly be a matrix of pairwise pi between a set of samples, for which the ijth cell gives the pairwise pi between samples i and j. However, it will also convert a single value (i.e., pairwise pi between a single pair of samples) or a vector of values.

Pairwise pi is calculated as the proportion of sites at which a pair of samples differs out of the total number of loci in the dataset. If it is calculated using only loci that are polymorphic in the global dataset, it is called pi at polymorphic sites. If it is calculated using all genotyped base-pairs, it is simply pi. Either statistic can be converted to allelic covariance and used for running BEDASSLE.

Value

This function returns the allelic covariance that corresponds to a particular value of pairwise pi. The allelic covariance can then be used to run a BEDASSLE analysis run with run.bedassle.


gbradburd/bedassle documentation built on May 20, 2022, 1 p.m.