找回密码
 注册
查看: 457|回复: 0

R语言 sendplot包 HeatmapWrapper()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 00:50:21 | 显示全部楼层 |阅读模式
HeatmapWrapper(sendplot)
HeatmapWrapper()所属R语言包:sendplot

                                        INTERACTIVE HEATMAP - DEPRECATED
                                         互动热图 -  DEPRECATED

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function is a wrapper for the R stats package heatmap. This will create an interactive heatmap image. NOTE: The majority of the code for this function is verbatim from the R package stats heatmap function. This function was designed to work as a wrapper to untilize the same functionality and plotting as the heatmap function with sendplot's interactive functionality.
这个函数是一个包装的R统计包热图。这将创建一个互动热图图像。注意:此功能的代码,大部分是逐字从R stats包的热图功能。此功能的目的是要作为一个,包装到untilize HeatMap在功能与sendplot的互动功能相同的功能和绘图工作。


用法----------Usage----------


heatmap.send.legacy(x,Rowv = NULL,
             Colv = if (symm) "Rowv" else NULL,
             distfun = dist,hclustfun = hclust,
             reorderfun = function(d,w) reorder(d, w),
             add.expr,symm = FALSE,
             revC = identical(Colv,"Rowv"),
             scale = c("row", "column", "none"),
             na.rm = TRUE, margins = c(5, 5),
             ColSideColors,RowSideColors,
             cexRow = 0.2 +  1/log10(nr),
             cexCol = 0.2 + 1/log10(nc),
             labRow = NULL,labCol = NULL,
             main = NULL,xlab = NULL,ylab = NULL,
             keep.dendro = FALSE,
             verbose = getOption("verbose"),
             mai.mat=NA, mai.prc=FALSE,
             z.value="value",
             x.lbls=NA,y.lbls=NA,xy.lbls=NA,
             x.links=NA, y.links=NA,
             xy.links=NA,asLinks=NA,
             bound.pt = FALSE, source.plot=NA,
             resize="800x1100",
             ps.paper="letter",ps.width=8,ps.height=11,
             fname.root="test",dir="./", header="v2",
             paint=FALSE, img.prog = NA,
             up.left=c(288,203),low.right=c(620,940),
             spot.radius=5, automap=FALSE, automap.method="mode")




参数----------Arguments----------

参数:x
numeric matrix of the values to be plotted
数值矩阵的值被绘制


参数:Rowv
determines if and how the row dendrogram should be computed and reordered.  Either a 'dendrogram' or a vector of values used to reorder the row dendrogram or 'NA' to suppress any row dendrogram (and reordering) or by default, 'NULL', see heatmap argument
决定是否以及如何计算和重新排序的行聚类分析。无论是“树状图”或重新排序的行树状图或“不适用”禁止任何行聚类分析和重新排序或默认值的向量,NULL,看到热图参数


参数:Colv
determines if and how the column dendrogram should be reordered.  Has the same options as the 'Rowv' argument above and additionally when 'x' is a square matrix, 'Colv = "Rowv"' means that columns should be treated identically to the rows
决定是否以及如何应重新排序列树状图。作为“Rowv”上述论点,另外,当x是一个方阵,具有相同的选项,“Colv =”Rowv“的”是指应该被视为同列的行


参数:distfun
function used to compute the distance (dissimilarity) between both rows and columns.  Defaults to 'dist'
函数,用于计算两个行和列之间的距离(相异)。默认设置为“区”


参数:hclustfun
function used to compute the hierarchical clustering when 'Rowv' or 'Colv' are not dendrograms.  Defaults to 'hclust'
函数,用于计算当Rowv或Colv不是聚类层次聚类。默认为“hclust的”


参数:reorderfun
function(d,w) of dendrogram and weights for reordering the row and column dendrograms.  The default uses 'reorder.dendrogram'
函数(d,w)的重新排序的行和列的聚类的聚类分析和重量。默认使用“reorder.dendrogram”


参数:add.expr
expression that will be evaluated after the call to 'image'.  Can be used to add components to the plot
表达式,该表达式将被评估后调用“形象”。可用于将组件添加到图


参数:symm
logical indicating if 'x' should be treated *symm*etrically; can only be true when 'x' is a square matrix.
逻辑指示应被视为如果x* SYMM * etrically;只能是真时,“x”是一个方阵。


参数:revC
logical indicating if the column order should be 'rev'ersed for plotting, such that e.g., for the symmetric case, the symmetry axis is as usual
逻辑表示如果列的顺序应该是reversed的图,例如,为对称的情况下,对称轴是像往常一样


参数:scale
character indicating if the values should be centered and scaled in either the row direction or the column direction, or none.  The default is '"row"' if 'symm' false, and '"none"' otherwise
字符,指示如果值应为中心和缩放的行方向或列方向上,或根本没有。默认为“”行“”如果“SYMM假的,”无“”,否则


参数:na.rm
logical indicating whether 'NA”s should be removed
逻辑“NA”是否应该被删除


参数:margins
numeric vector of length 2 containing the margins (see 'par(mar= *)') for column and row names, respectively
数字矢量长度为2的边缘(见“面值(3月= *))的列名和列名,分别


参数:ColSideColors
(optional) character vector of length 'ncol(x)' containing the color names for a horizontal side bar that may be used to annotate the columns of 'x'
(可选)字符的矢量长度“NCOL(x)的包含可用于注释的列的x的水平边栏的颜色名称


参数:RowSideColors
(optional) character vector of length 'nrow(x)' containing the color names for a vertical side bar that may be used to annotate the rows of 'x'
(可选)字符的矢量(x)的,可以用于标注的x的行的垂直边栏包含的颜色名称的长度“NROW


参数:cexRow
positive number, used as 'cex.axis' in for the row axis labeling. The defaults currently only use number of rows
正数,,作为“cex.axis为行轴标签。目前默认使用的行数


参数:cexCol
positive number, used as 'cex.axis' in for the column axis labeling. The defaults currently only use number of columns
正数,,用作cex.axis中的列的坐标轴标签。默认目前使用的列数


参数:labRow
character vectors with row labels to use; these default to 'rownames(x)'
特征向量与行标签使用这些默认的“行名(X)”


参数:labCol
character vectors with column labels to use; these default to 'colnames(x)'
特征向量与列标签,使用这些默认为“列名(X)”


参数:main
main title; defaults to none
主标题,默认为none


参数:xlab
x axis title; defaults to none
X轴标题,默认为none


参数:ylab
y axis title; defautls to none
Y轴标题; defautls无法比拟的


参数:keep.dendro
logical indicating if the dendrogram(s) should be kept as part of the result (when 'Rowv' and/or 'Colv' are not NA)
逻辑表明,如果树状图(S)应尽可能结果的一部分(当Rowv“和/或”Colv“不NA)


参数:verbose
logical indicating if information should be printed
逻辑表示,如果信息应印


参数:mai.mat
n x 4 matrix of values to be passed in for each plots par mai. n is equal to the length of plot.calls. If NA, uses default margins. Utitilzing this wrapper n will either be 3,4, or 5.
NX 4矩阵的值来传递为每个图面值迈。 n是等于plot.calls的长度。如果不适用,使用默认的页边距。 Utitilzing此包装n将是3,4或5。


参数:mai.prc
logical indicating if mai mat values are percentages or hard coded values. If mai.proc is T, indicates percentage.
逻辑说明,如果迈垫值的百分比或硬编码值。如果mai.proc是T,表示百分比。


参数:z.value
character vector indicating the label for what the z argument holds.
字符向量表示的z参数的标签。


参数:x.lbls
data frame of n x m which contains values relating to the x axis of the heatmap plot. n should be equal to the second dimension of the x argument.This information is displayed in the interactive plot window. This may be left as NA.
NXM其中包含有关的热图图的x轴的值的数据框。 n应该是平等的第二个方面的x argument.This信息显示在交互式绘图窗口中的。这可能被留为NA。


参数:y.lbls
data frame of n x m which contains values relating to the y axis of the heatmap plot. n should be equal to the first dimension of the x argument.This information is displayed in the interactive plot window. This may be left as NA  
NXM其中包含有关的热图图的y轴的值的数据框。 n应该是相等的第一个维度的x argument.This信息显示在交互式绘图窗口中的。为NA,这可能会留下


参数:xy.lbls
list of matricies. All matricies should be of n x m where n is equal to the first dimension of the x argument and m is equal to the second dimension of the x argument. This information is displayed in the interactive plot window. This may be left NA
列表的matricies。所有matricies应该是NXM其中n是等于的第一维中的参数x和m是等于引数x的第二维。此信息显示在交互式绘图窗口。这可能会留下不适用


参数:x.links
data frame of n x m which contains web addresses for links relating to the x axis of the heatmap plot. n should be equal to the second dimension of the x argument. m columns contains information regarding sample. This information is displayed as hyperlinks in the interactive plot window. This may be left NA
数据框NXM,其中包含网络地址关于HeatMap在图的x轴的链接。 n应该是等于参数x的第二维。 m列包含有关样品的信息。此信息显示作为交互式绘图窗口中的超链接。这可能会留下不适用


参数:y.links
data frame of n x m which contains web addresses for links relating to the y axis of the heatmap plot. n should be equal to the first dimension of the x argument. This information is displayed as hyperlinks in the interactive plot window. This may be left as NA
,的NXM其中包含链接的网页地址为y轴的热图图的数据框。 n应该等于X的参数的第一个维度。此信息显示作为交互式绘图窗口中的超链接。为NA,这可能会留下


参数:xy.links
list of matricies.  All matricies should be of n x m where n is equal to the first dimension of the x argument and m is equal to the second dimension of the x argument. This information is displayed in the interactive plot window as hyperlinks. The values in these matricies should be complete web address
列表的matricies。所有matricies应该是NXM其中n是等于的第一维中的参数x和m是等于引数x的第二维。为超链接的互动式绘图窗口中显示此信息。值在这些matricies应是完整的Web地址


参数:asLinks
contains complete web address for points that should be treated as hyperlinks. May be a data.frame or matrix of n x m  where n is equal to the first dimension of the x argument and m is equal to the second dimension of the x argument, a vector of length equal to the first dimension of the x argument that will be repeated, a vector of length equal to the second dimension of the x argument that will be repeated,a non NA value of length 1 that will be repeated for all points, or a vector of length dim(x)[1]*dim(x)[2]   
包含完整的网络地址应被视为超链接点。可能是一个数据框或矩阵NXM其中n是等于的第一维中的参数x和m是等于X的参数的第二维数,引数x的第一维中,将一个向量的长度等于被重复,一个向量的长度等于第二维的X的参数将被重复,非NA值的长度为1,将重复的所有点,或一个矢量长度暗淡(x)的[1] *暗淡(x)的[2]


参数:bound.pt
logical indicating if blue points should be plotted to aid in finding the upper left and lower right coordinates of a hte heatmap. If bound.pt is FALSE, indicates that up.left and low.right arguments are correct and will make the html file
逻辑指示是否应绘制蓝点,以帮助在寻找一个兴田热图的左上角和右下角的坐标。如果bound.pt是FALSE,表示up.left参数和low.right参数是正确的,并会在html文件


参数:source.plot
Indicates whether application should make a postscript file and then convert to png file, or if the png file should be made directly. This value is either ps, png, or NA. If NA the operating system is checked and the appropraite file format is output. Unix has a convert function that can convert a ps file to png file; we by default use this setup because we feel the postscript file maintains better quality. So on unix/linux systems if source.plot is NA, source.plot will be set to ps. Windows does not have this option, for this reason source.plot will be set to png if left NA
指示应用程序是否应该让一个postscript文件,然后转换成PNG文件,或png文件应直接。这个值可以是PS,PNG或NA。如果NA的操作系统被选中并且建立适合的文件格式是输出。 Unix系统有一个转换功能,可以将一个PS文件转换为png文件,默认情况下,使用这种设置,因为我们觉得postscript文件保持更好的质量。因此,在UNIX / Linux系统如果source.plot是NA,source.plot将被设置为PS。 Windows并没有这个选项,因为这个原因source.plot将被设置为PNG,如果不适用


参数:resize
character indicating resize value. The postscript version will be resized to this value when converted to .png.
字符表示缩放值。 PostScript版本时,这个值将被调整。PNG转换为。


参数:ps.paper
postscript paper argument
PostScript的纸张参数


参数:ps.width
poscript width argument
poscript宽度参数


参数:ps.height
postscript height argument
后记高度参数


参数:fname.root
Base name to use for posctscript, .png, and html file names.
为posctscript,PNG,和html文件名的基本名称使用。


参数:dir
directory path to where files should be created. Default creates files in working directory
应建立文件的目录路径。默认创建的文件在工作目录


参数:header
May either be v1 or v2. This determines which tooltip header will be in the html file. Each version has different features or works well with different web browsers. see sp.header for details.
可能是V1或V2。这决定了哪些工具提示头将在HTML文件中。每个版本都有不同的特点,或与不同的Web浏览器。有关详细信息,请参阅sp.header。


参数:paint
logical indicating if application should automatically open .png file for the user to view .png file and/or to retrieve needed bounding values of the first plot call. see details
逻辑表明,如果应用程序应该会自动打开。png文件,供用户查看。png文件和/或检索所需要边界值的第一条曲线呼叫。详情请参阅


参数:img.prog
If paint is TRUE, the command line call that will open a program to view .png file to retrieve pixil locations of interactive plot bounds. If this is left NA, the operating system is checked and a default program is used. For unix the default application is kolourpaint and for windows it is microsoft paint (mspaint)
如果涂料是TRUE,命令行调用,将打开一个程序来查看。png文件检索pixil交互式绘图边界的位置。如果没有此NA时,操作系统被选中并且使用一个默认程序。对于UNIX,默认应用程序kolourpaint的的和Windows是Microsoft画图(MSPAINT)


参数:up.left
The x and y value in pixels of the upper left hand corner of the first plot call. see details
的x和y的值以像素为单位的左上角的第一标绘呼叫。详情请参阅


参数:low.right
The x and y value in pixels of the lower right hand corner of the first plot call. see details
的x和y的值以像素为单位的右下角的第一标绘呼叫。详情请参阅


参数:spot.radius
radius of circle in pixels indicating area that will be interactive around the center of graphed points
圆的半径,在指示区域的像素,将绘制的点的中心周围是交互式


参数:automap
automatic detection of up.left and low.right bound points. Fully functional on linux/unix machines only.
的up.left和low.right绑定点的自动检测。全功能仅在Linux / UNIX机器。


参数:automap.method
Method to detect upper and lower bounds. Current options are mode or median
方法检测上限和下限。当前选择的模式或中位数


Details

详细信息----------Details----------

The majority of the code for this function is verbatim from the R package stats heatmap function. This function was designed to work as a wrapper to untilize the same functionality and plotting as the heatmap function with sendplot's interactive functionality. See heatmap for more details on arguments and details concerning the creatation of plots.
该函数的代码的大部分是逐字从R stats包的热图功能。此功能的目的是要作为一个,包装到untilize HeatMap在功能与sendplot的互动功能相同的功能和绘图工作。见heatmap的详细信息,参数和细节图的creatation。

See sendplot for more information regarding the creation of the interactive output with tool-tip content.
见sendplot创造的互动工具提示的内容输出方面的更多信息。

Users are encouraged to read the package vignette which includes a detailed discussion of all function arguments as well as several useful examples.
我们鼓励用户阅读的的包小插曲,其中包括详细讨论了函数的所有参数以及一些有用的例子。


值----------Value----------

Creates a static .ps and .png file, and an interactive html file
创建一个静态的。ps和png文件,和一个交互的HTML文件


注意----------Note----------

The majority of the code for this function is verbatim from the R package stats heatmap function. This function was designed to work as a wrapper to untilize the same functionality and plotting as the heatmap function with sendplot's interactive functionality.
该函数的代码的大部分是逐字从R stats包的热图功能。此功能的目的是要作为一个,包装到untilize HeatMap在功能与sendplot的互动功能相同的功能和绘图工作。

The x and y mappings to the interactive plot are created using the x and y vectors passed in as an argument to sendplot. Note: this could be handy if for example the user plotted more points to the first plot using the plt.extras argument. If the user wanted all points interactive, the x and y values of the sendplot argument would be a combination of all plotted points.
x和y的互动图的映射是使用x和y向量作为参数sendplot传递。注意:这可能是很方便的,例如,如果用户绘制的第一个图点,使用plt.extras参数。如果用户想点互动,x和y的值的sendplot参数将所有绘制的点的组合。

The interactive html plot currently only works in web browsers that implement java script.
交互的HTML图目前只适用于在实现Java脚本的Web浏览器。

The code used to create the javascript embedded in html file is a modified version of the javascript code or from the open source tooltip library. see reference links
用于创建JavaScript嵌入在HTML文件中的代码是修改后的版本的JavaScript代码的开源工具提示库。见参考文献链接

This function is deprecated. Please see heatmap.send for updated version.
此功能已经过时了。请参阅heatmap.send更新的版本。


(作者)----------Author(s)----------



Lori A. Shepherd and Daniel P. Gaile;

Authors of heatmap code used in our code: Andy Liaw, original; R. Gentleman, M. Maechler, W. Huber,revisions



参考文献----------References----------





参见----------See Also----------

heatmap.send, sendplot,sendxy, sendimage, heatmap
heatmap.send,sendplot,sendxy,sendimage,heatmap


实例----------Examples----------



rm(list=ls())
library(sendplot)

# mock matrix of values[模拟矩阵的值]
temp = matrix(rnorm(15), nrow=5, ncol=3)

# color bars for samples[彩条样品]
rcol = c("red", "blue", "yellow", "purple", "blue")
ccol = c("black", "green", "black")

# matrix of values to display in interactive window[矩阵的值显示在交互窗口]
temp.inv = list()
temp.inv$sample.ID = c("smp1", "smp2", "smp3")
temp.inv$count = 1:3
temp.inv$bb = 3:1
temp.inv = as.data.frame(temp.inv)

# matrix of values to display in interactive window[矩阵的值显示在交互窗口]
loc.inv = list()
loc.inv$spot = c("sp1", "sp2", "sp3","sp4","sp5")
loc.inv$vv = 1:5
loc.inv$bv = 5:1
loc.inv = as.data.frame(loc.inv)


#set up temporary directory[设立临时目录]
direct = paste(tempdir(),"/",sep="")
direct

heatmap.send.legacy(temp, RowSideColors=rcol, ColSideColors=ccol,
x.lbls=temp.inv, y.lbls=loc.inv, bound.pt=FALSE, paint=FALSE,
spot.radius=20, dir=direct)


# or display heatmap without color bands [或显示没有颜色带热图]
heatmap.send.legacy(temp, x.lbls=temp.inv, y.lbls=loc.inv, bound.pt=FALSE,
paint=FALSE, spot.radius=20,dir=direct)


# or without cluster[或无聚类]
heatmap.send.legacy(temp, Rowv=NA, Colv=NA, x.lbls=temp.inv, y.lbls=loc.inv, bound.pt=FALSE,
paint=FALSE, spot.radius=20,dir=direct)



转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-19 04:33 , Processed in 0.026935 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表