gpi(GeneticsPed)
gpi()所属R语言包:GeneticsPed
Genotype probability index
基因型概率指数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
gpi calculates Genotype Probability Index (GPI), which indicates the information content of genotype probabilities derived from segregation analysis.
gpi计算基因型概率指数(GPI),这表明,从种族隔离分析得出的基因型概率的信息内容。
用法----------Usage----------
gpi(gp, hwp)
参数----------Arguments----------
参数:gp
numeric vector or matrix, individual genotype probabilities
数字向量或矩阵,个体的基因型概率
参数:hwp
numeric vector or matrix, Hard-Weinberg genotype probabilities
数字向量或矩阵,硬温伯格基因型概率
Details
详情----------Details----------
Genotype Probability Index (GPI; Kinghorn, 1997; Percy and Kinghorn, 2005) indicates information that is contained in multi-allele genotype probabilities for diploids derived from segregation analysis, say Thallman et. al (2001a, 2001b). GPI can be used as one of the criteria to help identify which ungenotyped individuals or loci should be genotyped in order to maximise the benefit of genotyping in the population (e.g. Kinghorn, 1999).
基因型概率指数(GPI; Kinghorn,1997年;珀西和Kinghorn,2005年)表明,从分离分析得出的二倍体多等位基因概率中包含的信息,说Thallman等。人(2001A,2001年b)。磷脂可以用来作为标准之一,以帮助确定ungenotyped个人或位点应该进行基因分型,以最大限度地受益人口的基因分型(如Kinghorn,1999年)。
gp and hwp arguments accept genotype probabilities for multi-allele loci. If there are two alleles (1 and 2), you should pass vector of probabilities for genotypes (11 and 12) i.e. one value for heterozygotes (12 and 21) and always skipping last homozygote. With three alleles this vector should hold probabilities for genotypes (11, 12, 13, 22, 23) as also shown bellow and in examples. hwp and gpLong2Wide functions can be used to ease the setup for gp and hwp arguments.
gp和hwp参数接受多等位基因位点的基因型概率。如果有两个等位基因(1和2),你应该通过基因型(11和12),即价值为杂合子(12和21)的概率向量,总是跳过去的纯合子。这个向量应该有三个等位基因举行基因型的概率(11,12,13,22,23)也显示波纹管和例子。 hwp和gpLong2Wide功能,可用于缓解gp和hwp参数的设置。
If you have genotype probabilities for more than one individual, you can pass them to gp in a matrix form, where each row represents genotype probabilities of an individual. In case of passing matrix to gp, hwp can still accept a vector of Hardy-Weinberg genotype probabilities, which will be used for all individuals due to recycling. If hwp also gets a matrix, then it must be of the same dimension as that one passed to gp.
如果你有超过一个人的基因型概率,你可以把它们传递给gp矩阵形式,其中的每一行代表一个人的基因型概率。在gp,hwp还是可以接受的Hardy-温伯格基因型概率,将所有个人由于回收使用的向量传递矩阵的情况下。如果hwp也得到一个矩阵,那么它必须是同一维度,因为这传递gp。
值----------Value----------
Vector of N genotype probability indices, where N is
向量N基因型概率指数,其中N
作者(S)----------Author(s)----------
Gregor Gorjanc R code, documentation, wrapping into a package;
Andrew Percy and Brian P. Kinghorn Fortran code
参考文献----------References----------
probabilities derived from segregation analysis. Genetics 145(2):479-483 http://www.genetics.org/cgi/content/abstract/145/2/479
costs. Journal of Animal Breeding and Genetics 116(3):175-180 http://dx.doi.org/10.1046/j.1439-0388.1999.00192.x
multiple alleles and haplotypes. Journal of Animal Breeding and Genetics 122(6):387-392 http://dx.doi.org/10.1111/j.1439-0388.2005.00553.x
S. M. (2001a) Efficient computation of genotype probabilities for loci with many alleles: I. Allelic peeling. Journal of Animal Science 79(1):26-33 http://jas.fass.org/cgi/reprint/79/1/34
S. M. (2001b) Efficient computation of genotype probabilities for loci with many alleles: II. Iterative method for large, complex pedigrees. Journal of Animal Science 79(1):34-44 http://jas.fass.org/cgi/reprint/79/1/34
参见----------See Also----------
hwp and gpLong2Wide
hwp和gpLong2Wide
举例----------Examples----------
## --- Example 1 from Percy and Kinghorn (2005) ---[#---示例1从珀西和Kinghorn的(2005)---]
## No. alleles: 2[#号的等位基因:2]
## No. individuals: 1[#号的个人:1]
## Individual genotype probabilities:[#个体的基因型概率:]
## Pr(11, 12, 22) = (.1, .5, .4)[#镨(11,12,22)=(0.1,0.5,15.4)]
##[#]
## Hardy-Weinberg probabilities:[#哈迪 - 温伯格的概率:]
## Pr(1, 2) = (.75, .25)[#镨(1,2)=(0.75,0.25)]
## Pr(11, 12, (.75^2, 2*.75*.25,[#镨(11,12,(0.75 ^ 2,2 * .75 * 0.25]
## 22) = .25^2)[#22)= 0.25 ^ 2)]
## = (.5625, .3750,[#=(.5625,0.3750,]
## .0625)[#.0625)]
gp <- c(.1, .5)
hwp <- c(.5625, .3750)
gpi(gp=gp, hwp=hwp)
## --- Example 1 from Percy and Kinghorn (2005) extended ---[#---从珀西和Kinghorn的(2005)1例延长---]
## No. alleles: 2[#号的等位基因:2]
## No. individuals: 2[#号个人:2]
## Individual genotype probabilities:[#个体的基因型概率:]
## Pr_1(11, 12, 22) = (.1, .5, .4)[#Pr_1(11,12,22)=(0.1,0.5,15.4)]
## Pr_2(11, 12, 22) = (.2, .5, .3)[#Pr_2(11,12,22)=(0.2,0.5,0.3)]
(gp <- matrix(c(.1, .5, .2, .5), nrow=2, ncol=2, byrow=TRUE))
gpi(gp=gp, hwp=hwp)
## --- Example 2 from Percy and Kinghorn (2005) ---[#---例如,从珀西和Kinghorn的(2005)2 ---]
## No. alleles: 3[#号的等位基因:3]
## No. individuals: 1[#号的个人:1]
## Individual genotype probabilities:[#个体的基因型概率:]
## Pr(11, 12, 13, (.1, .5, .0,[#镨(11,12,13,(0.1,0.5,2.0,]
## 22, 23 = .4, .0,[#22,23 = 0.4,2.0,]
## 33) .0)[#33).0)]
##[#]
## Hardy-Weinberg probabilities:[#哈迪 - 温伯格的概率:]
## Pr(1, 2, 3) = (.75, .25, .0)[#镨(1,2,3)=(0.75,0.25,2.0)]
## Pr(11, 12, 13, (.75^2, 2*.75*.25, .0,[#镨(11,12,13,(0.75 ^ 2,2 * 0.75 * 0.25,2.0,]
## 22, 23, = 0.25^2, .0,[#22,23 = 0.25 ^ 2 .0]
## 33) .0)[#33).0)]
## = (.5625, .3750, .0[#=(.5625,0.3750,.0]
## .0625, .0,[#.0625,.0,]
## .0)[#.0)]
gp <- c(.1, .5, .0, .4, .0)
hwp <- c(.5625, .3750, .0, .0625, .0)
gpi(gp=gp, hwp=hwp)
## --- Example 3 from Percy and Kinghorn (2005) ---[#---例如,从珀西和Kinghorn的(2005)3 ---]
## No. alleles: 5[#号的等位基因:5]
## No. individuals: 1[#号的个人:1]
## Hardy-Weinberg probabilities:[#哈迪 - 温伯格的概率:]
## Pr(1, 2, 3, 4, 5) = (.2, .2, .2, .2, .2)[#镨(1,2,3,4,5)=(0.2,0.2,0.2,0.2,.2)]
## Pr(11, 12, 13, ...) = (Pr(1)^2, 2*Pr(1)+Pr(2), 2*Pr(1)*Pr(3), ...)[#镨(11,12,13,...)=(PR(1)^ 2,2 * PR(1)+ PR(2),2 * PR(1)* PR(3),...)]
##[#]
## Individual genotype probabilities:[#个体的基因型概率:]
## Pr(11, 12, 13, ...) = gp / 2[#镨(11,12,13,...)= GP / 2]
## Pr(12) = Pr(12) + .5[#镨(12)= PR(12)+0.5]
(hwp <- rep(.2, times=5) %*% t(rep(.2, times=5)))
hwp <- c(hwp[upper.tri(hwp, diag=TRUE)])
(hwp <- hwp[1 length(hwp) - 1)])
gp <- hwp / 2
gp[2] <- gp[2] + .5
gp
gpi(gp=gp, hwp=hwp)
## --- Simulate gp for n alleles and i individuals ---[#---模拟GP为n等位基因,我个人---]
n <- 3
i <- 10
kAll <- (n*(n+1)/2) # without -1 here![无-1在这里!]
k <- kAll - 1
if(require("gtools")) {
gp <- rdirichlet(n=i, alpha=rep(x=1, times=kAll))[, 1:k]
hwp <- as.vector(rdirichlet(n=1, alpha=rep(x=1, times=kAll)))[1:k]
gpi(gp=gp, hwp=hwp)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|