Description Usage Arguments Details Value Author(s) References See Also Examples
HILL calulates the log-likelihood of a hybrid genotype given parental allele frequencies, an ancestry index (S), and interclass heterozygosity (H). This function is used by HIest and HIclass for data analysis.
1 |
par |
A numeric vector including a value of S and a value of H |
G |
An individual diploid genotype as matrix (http://pritch.bsd.uchicago.edu/structure.html). If |
P |
Parental allele frequencies. A matrix or data frame with the following columns (order is important!): Locus name, Allele name, P1 allele frequency, P2 allele frequency. For |
type |
A string representing the data type. The options are |
Given two ancestral species or parental populations (P1 and P2), the ancestry index (S) is the proportion of an individual's alleles descending from alleles in the P1 population and the interclass heterozygosity (H) is the proportion of an individual's loci that have one allele from each ancestral population (Lynch 1991). The likelihood functions are described in Fitzpatrick (2012).
The natural log of the likelihood of the data given S, H, and P.
Ben Fitzpatrick
Fitzpatrick, B. M. 2008. Hybrid dysfunction: Population genetic and quantitative genetic perspectives. American Naturalist 171:491-198.
Fitzpatrick, B. M. 2012. Estimating ancestry and heterozygosity of hybrids using molecular markers. BMC Evolutionary Biology 12:131. http://www.biomedcentral.com/1471-2148/12/131
Lynch, M. 1991. The genetic interpretation of inbreeding depression and outbreeding depression. Evolution 45:622-629.
HIest for maximum likelihood estimation of S and H, HIsurf for a likelihood surface, HIclass for likelihoods of early generation hybrid classes, HItest to compare the classification to the maximum likelihood.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ##-- A random codominant data set of 1 individual with 5 markers with three possible alleles each
P <- data.frame(Locus=rep(1:5,each=3),Allele=rep(1:3,5),
P1=as.vector(rmultinom(5,10,c(.7,.2,.1)))/10,
P2=as.vector(rmultinom(5,10,c(.1,.2,.7)))/10)
G <- matrix(nrow=2,ncol=5)
for(i in 1:5){
G[,i] <- sample(c(1,2,3),size=2,replace=TRUE,prob=rowMeans(P[P$Locus==i,3:4]))
}
HILL(par=c(0.5,0.5),G,P,type="codominant")
##-- Make it into allele count data (count "3" alleles)
P.c <- P[seq(from=3,to=15,by=3),]
G.c <- colSums(G==3)
HILL(par=c(0.5,0.5),G.c,P.c,type="allele.count")
##-- Make it into dominant data where allele 3 is dominant
G.d <- replace(G.c,G.c==2,1)
HILL(par=c(0.5,0.5),G.d,P.c,type="dominant")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.