cnv.plot(CNVtools)
cnv.plot()所属R语言包:CNVtools
Plots posterior probabilty distributions
图后probabilty分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Makes formatted density plots from the posterior data frame(s) returned by CNVtest.binary
使格式化后的数据框返回由CNVtest.binary()密度图
用法----------Usage----------
cnv.plot(posterior, hist.or.dens='histogram', batch = NULL, freq = NULL, ...)
参数----------Arguments----------
参数:posterior
The posterior distribution obtained from the CNVtools fitting algorithm, for example using CNVtest.binary
从CNVtools拟合算法获得后验分布,例如使用CNVtest.binary
参数:hist.or.dens
Either 'histogram' or 'density' to plot the data as an histogram or using a kernel density estimator
要么“直方图”或“密度”作为直方图中的数据绘制或使用内核密度估计
参数:batch
character vector (usually of length 1, but not always), designing the batches one wants to plot.
特征向量(通常长度为1,但并不总是),设计批次要绘制。
参数:freq
This argument is only relevant when hist.or.dens='histogram' (the default). It matches the argument freq of the hist function. With freq = FALSE frequencies, and not raw counts, are shown in the histogram.
这种说法是只有有关时hist.or.dens =“直方图”(默认)。它的历史功能参数频率相匹配。与频率= FALSE的频率,而不是原始的计数,直方图显示。
参数:...
Usual arguments passed to the hist function, including main or breaks for example.
通常的参数传递的历史功能,包括例如主或截断。
作者(S)----------Author(s)----------
Vincent Plagnol <a href="mailto:vincent.plagnol@cimr.cam.ac.uk">vincent.plagnol@cimr.cam.ac.uk</a> and Chris Barnes <a href="mailto:christopher.barnes@imperial.ac.uk">christopher.barnes@imperial.ac.uk</a>
举例----------Examples----------
#Load data for CNV for two control cohorts [CNV的数据加载两个控制同伙]
data(A112)
raw.signal <- as.matrix(A112[, -c(1,2)])
dimnames(raw.signal)[[1]] <- A112$subject
#Extract CNV signal using principal components[采用主成分提取CNV的信号]
pca.signal <- apply.pca(raw.signal)
#Extract batch, sample and trait information[提取批次,样品和特点的信息]
batches <- factor(A112$cohort)
sample <- factor(A112$subject)
trait <- ifelse( A112$cohort == '58C', 0, 1)
#Fit the CNV with a three component model[三个组件模型适合在CNV]
fit.pca <- CNVtest.binary(signal = pca.signal, sample = sample, batch = batches,
disease.status = trait, ncomp = 3, n.H0=3, n.H1=3,
model.disease = "~ cn")
cnv.plot(fit.pca[['posterior.H0']], batch = '58C', breaks = 30)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|