prettyDend(made4)
prettyDend()所属R语言包:made4
Draw hierarchical tree of gene expression data with a colorbar for numerous class vectors
绘制了众多一流向量的彩条基因表达数据的层次结构树
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Function which performs a hierarchical cluster analysis of data, drawing a dendrogram, with colorbars for different sample covariate beneath the dendrogram
函数执行数据的聚类分析,制订不同的样本共变数colorbars发生树,树状图下方
用法----------Usage----------
参数----------Arguments----------
参数:dataset
a matrix, data.frame, ExpressionSet or marrayRaw-class. If the input is gene expression data in a matrix or data.frame. The rows and columns are expected to contain the variables (genes) and cases (array samples) respectively.
matrix,data.frame,ExpressionSet或marrayRaw-class。如果输入的是一个matrix或data.frame的基因表达数据。预计包含的变量(基因)和例(阵列样品)分别行和列。
参数:labels
Vector, labels to be placed on samples in plots. Default is rownames(dataset).
向量,样本放置在图的标签。默认是rownames(集)。
参数:title
Character, label to be placed on plots. Default is NULL.
字符,标签被放在图上。默认NULL。
参数:classvec
A factor or vector or matrix or data.frame which describes the classes in columns of the dataset. Default is NULL.
一个factor或vector或matrix或data.frame其中描述dataset列类。默认NULL。
参数:covars
Numeric. The columns of the data.frame classve to be used as class vectors. These will be displayed as color bars under the dendrogram. The default is 1 (column 1).
数字。类向量被用来作为数据框classve列。这将显示下树状图的彩条。默认值是1(第1列)。
参数:returnTree
Logical. Return the hieracrhical cluster analysis results. Default is FALSE.
逻辑。返回的hieracrhical的的聚类分析结果。默认FALSE。
参数:getPalette
Function, which generates a palette of colors. The default uses getcol function in made4. Other examples are provided below
功能,从而产生颜色的调色板。默认使用made4getcol功能。其他例子如下:
参数:...
further arguments passed to or from other methods.
通过进一步的论据或其他方法。
Details
详情----------Details----------
The hierarchical plot is produced using average linkage cluster analysis with 1- Pearson's correlation metric. The default set of colors used to generate the color bars of the plots can be changed (see example below). By default, if there is only two levels in the factor, the colors will be black and grey.
采用平均连锁聚类分析 - 皮尔森相关指标层次的图产生。默认设置用于生成的图的彩条的颜色是可以改变的(见下面的例子)。默认情况下,如果有中只有两个层次的因素,颜色是黑色和灰色。
作者(S)----------Author(s)----------
Aedin Culhane
参见----------See Also----------
See also as overview, hclust
还可以看overview,hclust
举例----------Examples----------
data(khan)
logkhan<-log2(khan$train)
# Get a character vector which defines which khan samples are cell lines or tissue sample[得到一个特征向量定义汗样本单元株或组织样本]
khanAnnot= cbind(as.character(khan$train.classes),khan$cellType)
print(khanAnnot[1:3,])
# Add 2 color bar, one for cancer subtype, another for cell type under dendrogram[新增2彩条,癌症亚型的单元类型,另一个根据树状]
prettyDend(logkhan, classvec=khanAnnot, covars = c(1,2), labels=khan$train.classes)
# To change the palette of colors[要改变颜色的调色板]
# Use topo.colors(), see colors() for more help on inbuilt palettes[使用topo.colors(),颜色()内置的调色板上的更多帮助]
prettyDend(logkhan, classvec=khanAnnot, covars = c(1,2), labels=khan$train.classes, getPalette=topo.colors)
# To use RColorBrewer Palettes[使用RColorBrewer调色板]
library(RColorBrewer)
# Use RColorBrewer Dark2 which contains 8 colors [使用RColorBrewer Dark2其中包含8种颜色]
prettyDend(logkhan, classvec=khanAnnot, covars = c(1,2), labels=khan$train.classes, getPalette=function(x) brewer.pal(8,"Dark2")[1:x])
# Use RColorBrewer Set1 which contains 9 colors [使用RColorBrewer设置1,其中包含9种颜色]
prettyDend(logkhan, classvec=khanAnnot, covars = c(1,2), labels=khan$train.classes, getPalette=function(x) brewer.pal(9,"Set1")[1:x])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|