hilbertDisplay(HilbertVisGUI)
hilbertDisplay()所属R语言包:HilbertVisGUI
Hilbert curve visualization
Hilbert曲线的可视化
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Display one or several long integer vectors in an interactive fashion by means of the Hilbert curve.
显示一个Hilbert曲线的方式,或在一个互动的时尚长整数向量。
See the vignette for a full explanation.
看到一个完整的解释的暗角。
用法----------Usage----------
hilbertDisplay(
...,
palettePos = colorRampPalette( c( "white", "red" ) )( 300 ),
paletteNeg = colorRampPalette( c( "white", "blue" ) )( length(palettePos) ),
maxPaletteValue = NULL,
naColor = "gray",
plotFunc = simpleLinPlot,
names=NULL,
sameScale=TRUE,
pow2=FALSE,
portrait=TRUE,
fullLengths = NULL )
参数----------Arguments----------
参数:...
The data vectors to be visualized. This may be integer or real vectors, either as ordinary R vectors or as Rle vectors (as defined in the IRanges packages). Care is taken within hilbertDisplay that these vectors do not get duplicated, so that you can pass very large vectors.
可视化的数据向量。这可能是整数或实数向量,无论是作为普通ŕ向量或Rle向量(IRanges包中定义)。内hilbertDisplay采取护理,这些向量不重复,这样您就可以通过非常大的向量。
参数:palettePos
The color palette used to visualize positive valued bins in the data. This must be either be a character vector of valid color names. If no palette is supplied, a ramp from white to red is used.
调色板用于可视化数据的价值在积极箱。这必须是一个有效的颜色名的字符向量。如果没有提供调色板,从白色到红色的坡道。
参数:paletteNeg
The color palette for bins with negative values. Both palettes must have the same number of colours.
为负值箱的调色板。这两种调色板必须有相同数量的颜色。
参数:maxPaletteValue
The absolute bin value that should correspond to the end of the two palettes. (The beginning of the palettes always represents 0.) Within the graphical user interface, buttons are provided to adjust this interactively. If no value is provided, the median of the absolute values of maxima and minima of the data vectors is used.
绝对的bin值,应符合两个调色板。 (调色板开始,始终代表0),在图形用户界面,按钮提供交互式调整。如果没有提供任何值,最大值和最小值的数据向量的绝对值的中位数。
参数:naColor
The color to be used for bins which contain NAs or correspond to data outside the limits of the data vector. Pass a color name or a triple of RGB values. By default, "gray" is used.
颜色可用于箱,其中包含NAS或对应数据以外的数据向量的限制。通过颜色名称或RGB值的三倍。默认情况下,“灰色”。
参数:plotFunc
An R function that is called if you use the "Linear plot" function offer by HilbertCurveDisplay's GUI. If you enable this function and then click on a pixel in the display, the function supplied as plotFunc is called. If you do not supply this parameter, the function simpleLinPlot (part of this package) is used. If you supply your own function, it must accept two parameters: data and info. data will be the currently displayed data vector. Be careful that your function does not duplicate it (check with tracemem, if in doubt) in order to avoid performance problems when dealing with large data. The second argument, info, is a list, supplying the following fields, all of which, except for the last one, are single integers: info$binLo, info$bin, and info$binHi are the lower, middle, and upper coordinate (i.e., vector index) of the bin represented by the pixel onto which the user has clicked. info$dispLo and info$dispHi are the lowest and highest index of the part of the vector currently displayed. info$seqIdx is the index of the currently displayed vector (i.e., its position in the '...' argument) and ionfo$seqName is its name. All indices are one-based. Your function should plot a region of interest around data[info$bin], or do some other useful operation. Any return value is ignored. For a very simple example, see the body of simpleLinPlot.
被称为如果您使用“线性关系”HilbertCurveDisplay的GUI功能提供一个R函数。如果启用此功能,然后点击显示一个像素,提供的功能plotFunc被称为。如果你不提供此参数,函数simpleLinPlot(这个包的一部分)使用。如果你提供你自己的功能,它必须接受两个参数:data和info。 data将当前显示的数据向量。小心你的函数不重复它,以避免出现性能问题,在处理大量数据时(tracemem检查,如果有疑问)。第二个参数,info,是一个列表,提供以下领域,所有这一切,除了最后一个,是单一的整数:info$binLo,info$bin,info$binHi。 是低,中,上到用户点击的像素所代表的bin坐标(即矢量指数)。 info$dispLo和info$dispHi是目前的最低和最高的指数向量显示。 info$seqIdx是当前显示的矢量指数(即,其位置在...的说法)和ionfo$seqName是它的名字。所有指数是一个基于。你的功能应该绘制左右data[info$bin]利益的区域,或做一些其他有用的操作。任何返回值将被忽略。一个很简单的例子,看到身体simpleLinPlot。
参数:names
The names of the sequences. A character vector. If not supplied, the expressions used in the '...' argument, as reported by substitute are used.
序列的名称。字符向量。如果没有提供,表达式中使用的“...”参数,作为substitute报道是使用。
参数:sameScale
Setting this argument to TRUE pads all but the largest vector with NAs such that all vectors have the same length. (The padding is done "virtually", i.e. no dupliocation in memory occurs.) The purpose of this is to make sure that the bin size (i.e. the number of values depicted by one pixel) stays constant, when using the DisplayHilbertViewer GUI's "Prev" and "Next" buttons, which switch the display through the supplied data vectors.
这个参数设置为TRUE填充所有,但最大的向量NA的所有向量具有相同的长度。 (填充是“几乎”,即在内存中没有发生dupliocation)。这样做的目的是确保的bin大小(即描述一个像素值)保持不变,当使用的DisplayHilbertViewer的GUI的“上一页“和”下一步“按钮,切换显示,通过提供的数据向量。
参数:pow2
Setting thsi argument to TRUE pads all vectors virtually with NAs such that their length becomes a power of 2. The purpose of this becomes apparent if you zoom in so much that several pixels correspond to the same data vector element. Then, without this options, the values take on strange fractal forms, while they are square in case of a power-of-2 length.
,设置thsi参数TRUE填充几乎所有向量NA等,它们的长度变成了2个电源。这样做的目的显而易见,如果你在这么多的变焦,几个像素对应到相同的数据向量元素。然后,如果没有这个选项,其值取奇怪的分形形式,而它们的长度为2电源的情况下平方米。
参数:portrait
Setting this option to FALSE changes the GUI layout such that the controls appear to the right of the curve display ("landscape layout") as opposed to the usual case of them appearing below ("portrait layout"). This is useful for small screens as the GUI window may be two tall to fit on the screen in portrait mode.
将此选项设置为FALSE改变GUI布局等控件显示的曲线显示的权利(“景观规划”),而不是通常情况下,他们出现在下面的(“纵向布局”)。这是有用的小屏幕,GUI窗口,可能是两个高大的,以适应在肖像模式下的屏幕上。
参数:fullLengths
This option allows you to manually control the padding of vectors with NAs if you do not like the result of the same.scale or pow2 option. Supply an integer vector with as many values as their are vectors in the '...' argument, specifying the length including padding for each data vector. Passing numbers smaller than the length of the data.vector results in only the beginning of the vector being displayed.
此选项允许你手动控制填充NA的向量,如果你不喜欢same.scale或pow2选项的结果。提供尽可能多的价值,因为他们是在...的向量整数向量参数,指定包括每个数据向量填充的长度。通过数字小于长度仅在开头所显示的向量data.vector结果。
值----------Value----------
Returns an invisible NULL.
返回一个无形NULL。
作者(S)----------Author(s)----------
Simon Anders, EMBL-EBI, <a href="mailto:sanders@fs.tum.de">sanders@fs.tum.de</a>
参见----------See Also----------
simpleLinPlot
simpleLinPlot
举例----------Examples----------
random <- c( as.integer( runif(100000)*30 ) )
ramp <- c( as.integer( 0:19999/100 ) )
try( hilbertDisplay( random, ramp ) )
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|