callNaiveGenotypes.numeric(aroma.light)
callNaiveGenotypes.numeric()所属R语言包:aroma.light
Calls genotypes in a normal sample
吁请正常样本的基因型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Calls genotypes in a normal sample.
呼吁在一个正常的样本的基因型。
用法----------Usage----------
参数----------Arguments----------
参数:y
A numeric vector of length J containing allele B fractions for a normal sample.
一个numericvector长度为j的正常样本的等位基因B组分。
参数:cn
An optional numeric vector of length J specifying the true total copy number in \{0,1,2,NA\} at each locus. This can be used to specify which loci are diploid and which are not, e.g. autosomal and sex chromosome copy numbers.
一个可选的numericvector长度为j的指定\{0,1,2,NA\}在每个座位的真实总套数的。这可以用来指定位点是二倍体,哪些不是,如常染色体和性染色体拷贝数。
参数:flavor
A character string specifying the type of algorithm used.
一个character字符串,指定使用的算法类型。
参数:...
Additional arguments passed to *fitNaiveGenotypes().
额外的参数传递到*fitNaiveGenotypes()。
参数:modelFit
A optional model fit as returned by *fitNaiveGenotypes().
作为一个可选的模型拟合*fitNaiveGenotypes()返回。
参数:verbose
A logical or a Verbose object.
一个logical或Verbose对象。
值----------Value----------
Returns a numeric vector of length J containing the genotype calls in allele B fraction space, that is, in [0,1] where 1/2 corresponds to a heterozygous call, and 0 and 1 corresponds to homozygous A and B, respectively. Non called genotypes have value NA.
返回一个numericvector呼吁长度J含有基因型,B等位基因分数空间,也就是说,在[0,1] 1/2对应的杂合的呼叫,0和1的对应纯合子A和B,分别。非称为基因型值NA。
失踪者和非限定值----------Missing and non-finite values----------
A missing value always gives a missing (NA) genotype call. Negative infinity (-Inf) always gives genotype call 0. Positive infinity (+Inf) always gives genotype call 1.
缺失值总是给人失踪(NA)基因型通话。负无穷( - Inf)总是给人基因型通话0。“正无穷大(+Inf)总是给人基因型通话1。
作者(S)----------Author(s)----------
Henrik Bengtsson (<a href="http://www.braju.com/R/">http://www.braju.com/R/</a>)
参见----------See Also----------
Internally *fitNaiveGenotypes() is used to identify the thresholds.
内部*fitNaiveGenotypes()用于识别阈值。
举例----------Examples----------
layout(matrix(1:3, ncol=1))
par(mar=c(2,4,4,1)+0.1)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -[----------------------------]
# A bimodal distribution[双峰分布]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -[----------------------------]
xAA <- rnorm(n=10000, mean=0, sd=0.1)
xBB <- rnorm(n=10000, mean=1, sd=0.1)
x <- c(xAA,xBB)
fit <- findPeaksAndValleys(x)
print(fit)
calls <- callNaiveGenotypes(x, cn=rep(1,length(x)), verbose=-20)
xc <- split(x, calls)
print(table(calls))
xx <- c(list(x),xc)
plotDensity(xx, adjust=1.5, lwd=2, col=seq(along=xx), main="(AA,BB)")
abline(v=fit$x)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -[----------------------------]
# A trimodal distribution with missing values[三峰分布与遗漏值]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -[----------------------------]
xAB <- rnorm(n=10000, mean=1/2, sd=0.1)
x <- c(xAA,xAB,xBB)
x[sample(length(x), size=0.05*length(x))] <- NA;
x[sample(length(x), size=0.01*length(x))] <- -Inf;
x[sample(length(x), size=0.01*length(x))] <- +Inf;
fit <- findPeaksAndValleys(x)
print(fit)
calls <- callNaiveGenotypes(x)
xc <- split(x, calls)
print(table(calls))
xx <- c(list(x),xc)
plotDensity(xx, adjust=1.5, lwd=2, col=seq(along=xx), main="(AA,AB,BB)")
abline(v=fit$x)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -[----------------------------]
# A trimodal distribution with clear separation[三峰分布具有明确的分离]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -[----------------------------]
xAA <- rnorm(n=10000, mean=0, sd=0.02)
xAB <- rnorm(n=10000, mean=1/2, sd=0.02)
xBB <- rnorm(n=10000, mean=1, sd=0.02)
x <- c(xAA,xAB,xBB)
fit <- findPeaksAndValleys(x)
print(fit)
calls <- callNaiveGenotypes(x)
xc <- split(x, calls)
print(table(calls))
xx <- c(list(x),xc)
plotDensity(xx, adjust=1.5, lwd=2, col=seq(along=xx), main="(AA',AB',BB')")
abline(v=fit$x)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|