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

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

[复制链接]
发表于 2012-2-25 18:15:15 | 显示全部楼层 |阅读模式
xyplot(flowViz)
xyplot()所属R语言包:flowViz

                                         Methods implementing Lattice xyplots for flow data.
                                         实施格xyplots流量数据的方法。

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

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

These functions create Trellis scatter plots (a.k.a. dot plots in the Flow Cytometry community) from flow cytometry data.
这些功能创建网格流式单元仪数据的分散图(又名点图流式单元仪社区)。


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


## Method for 'flowFrame' objects without a formula.
## This creates plots of all flow parameters agains
## time.
## S4 method for signature 'flowFrame,missing'
xyplot(
    x,
    data,
    time,
    xlab,
    ylab="",
    layout,
    prepanel=prepanel.xyplot.flowframe.time,
    panel=panel.xyplot.flowframe.time,
    type="discrete",
    ...)


## prepanel function for time line plots of flowFrames
prepanel.xyplot.flowframe.time(
    x,
    y,
    frame,
    time,
    ...)


## panel function for time line plots of flowFrames
panel.xyplot.flowframe.time(
    x,
    y,
    frame,
    time,
    type="discrete",
    nrpoints=0,
    binSize=100,
    ...)



## method for formulae with 'flowFrame' objects
## S4 method for signature 'formula,flowFrame'
xyplot(
    x,
    data,
    smooth=TRUE,
    prepanel=prepanel.xyplot.flowframe,
    panel=panel.xyplot.flowframe,
    ...)


## prepanel function for generic xyplots of flowFrames
prepanel.xyplot.flowframe(
    frame,
    channel.x.name,
    channel.y.name,
    ...)
   

## panel function for generic xyplots of flowFrames
panel.xyplot.flowframe(
    x,
    y,
    frame,
    filter=NULL,
    smooth=TRUE,
    margin=TRUE,
    outline=FALSE,
    channel.x.name,
    channel.y.name,
    pch=gpar$flow.symbol$pch,
    alpha=gpar$flow.symbol$alpha,
    cex=gpar$flow.symbol$cex,
    col=gpar$flow.symbol$col,
    gp,
    ...)



## method for 'flowSet' objects
## S4 method for signature 'formula,flowSet'
xyplot(
    x,
    data,
    smooth=TRUE,
    filter = NULL,
    as.table=TRUE,
    prepanel=prepanel.xyplot.flowset,
    panel=panel.xyplot.flowset,
    xlab=channel.x.name,
    ylab=channel.y.name,
    par.settings=NULL,
    ...)


## prepanel function for generic xyplots of flowSets
prepanel.xyplot.flowset(
    x,
    frames,
    channel.x.name,
    channel.y.name,
    ...)


## panel function for generic xyplots of flowSets
panel.xyplot.flowset(
    x,
    frames,
    filter=NULL,
    channel.x,
    channel.y,
    ...)


## method for various workflow objects
## S4 method for signature 'formula,view'
xyplot(
    x,
    data,
    ...)


## S4 method for signature 'view,missing'
xyplot(
    x,
    data,
    ...)


## S4 method for signature 'formula,gateView'
xyplot(
    x,
    data,
    filter=NULL,
    par.settings,
    ...)
      



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

参数:x
A formula describing the structure of the plot and the variables to be used in the display.  In the prepanel and panel functions, also the names of flowFrames or any of the annotation data columns in the phenoData slot.  
公式描述的图和结构要在显示器中使用的变量。 prepanel和panel功能,也flowFrames或phenoData插槽注释数据列的名称。


参数:data, y, frame
a flowSet or flowFrame object that serves as the source of data. For the workflow methods, this can also be various view or actionItem objects.
flowSet或flowFrame对象提供的数据源。对于工作流的方法,这也可以是各种view或actionItem对象。


参数:time
A character string giving the name of the data column recording time. If not provided, we try to guess from the available parameters.  
一个字符串,名称列数据记录时间。如果不提供,我们尝试猜测从可用的参数。


参数:xlab, ylab
Labels for data axes, with suitable defaults taken from the formula.  
数据轴的标签,采取合适的默认值从公式。


参数:as.table, layout
These arguments are passed unchanged to the corresponding methods in lattice, and are listed here only because they provide different defaults.  See documentation for the original methods for details.  
这些参数被传递不变,在晶格中的相应的方法,这里列出的仅仅是因为他们提供不同的默认值。有关详细信息,请参阅原始方法的文件。


参数:type
type of rendering; see panel.xyplot for details. For the basic flowFrame method without a detailed formula, the addtional type discrete is available, which plots a smoothed average of the flow cytometry values against time.  
渲染类型;panel.xyplot详情。基本flowFrame没有一个详细的公式的方法,addtional类型discrete,图的流式单元仪对时间值的平滑平均。


参数:nrpoints
The number of points plotted on the smoothed plot in sparse regions. This is only listed here because we use a different default. See panel.smoothScatter for details.  
在稀疏区域平滑图绘制的点数。这是这里唯一的上市,因为我们使用不同的默认。看到panel.smoothScatter详情。


参数:binSize
The size of a bin (i.e., the number of events within a bin) used for the smoothed average timeline plots.  
一个垃圾桶的大小(即,在垃圾桶的事件数量),用于平滑的平均时间图。


参数:channel.x.name, channel.y.name
Character strings giving corresponding names used to match filter parameters if applicable.  
字符串给予相应的名称,用来匹配滤波器的参数,如适用。


参数:smooth
Logical. If TRUE, panel.smoothScatter is used to display a partially smoothed version of the data. Otherwise, events are plotted individually, as in a standard scatter plot. If FALSE, a graphical parameter colramp can be used to obtain a coloring of points that is indicative of their local density.   
逻辑。如果TRUE,panel.smoothScatter是用来显示数据的一个部分平滑版本。否则,事件单独绘制,在一个标准的散点图。如果FALSE,一个图形参数colramp可以用来获得一个点着色,表明当地的密度。


参数:filter
A filter, filterResult or filterResultList object or a list of such objects of the same length as the flowSet. The appropriate spherical 2D representation of this filter will be superimposed on the plot if smooth=TRUE, or the result of the filtering operation will be indicated by grouping if smooth=FALSE. The software will figure out whether the filter needs to be evaluated in order to be plotted (in which case providing a filterResult can speed things up considerably).  
一个filter,filterResult或filterResultList对象或相同长度的flowSet对象名单。将适当的球形此过滤器的二维表示如果图上叠加smooth=TRUE,或过滤操作的结果将显示分组如果smooth=FALSE。该软件将找出filter是否为了要绘制(在这种情况下提供filterResult可以加快东西大大),需要进行评估。


参数:margin
Logical indicating whether to truncate the density estimation on the margins of the measurement range and plot margin events as lines if smooth=TRUE. To avoid visual artifacts it is highly recommended to set this option to TRUE.  
逻辑表明是否要截断的测量范围和图保证金事件的边缘,如果smooth=TRUE线密度估计。为了避免视觉效果,强烈建议设置此选项TRUE。


参数:outline
Logical, specifying whether to add the boundaries of a gate to the plot when smooth=FALSE in addition to the grouping. Defaults to FALSE.  
逻辑,指定是否添加门边界的图时smooth=FALSE除了分组。 FALSE默认。


参数:pch, cex, col, alpha
Graphical parameters used when smooth=FALSE. These mostly exist for conveniance and much more control is available throught the lattice-like par.setting and flowViz.par.set customization. See flowViz.par.set for details.  
图形参数时所用的smooth=FALSE。这些大多存在为conveniance和更多的控制是透过类lattice和par.setting定制flowViz.par.set。看到flowViz.par.set详情。


参数:par.settings
A list of lists of graphical parameters.  See flowViz.par.set for details.
图形参数列表列表。看到flowViz.par.set详情。


参数:gp
A list of graphical parameters that are passed down to the low level panel functions. This is for internal use only. The public user interface to set graphical parameters is either par.settings for customization of a single call or flowViz.par.set for customization of session-wide defaults.  
向下传递到低级别的面板功能的图形参数列表。这是仅供内部使用。公众用户界面来设置图形参数是要么定制的单一呼叫或会话范围的默认定制par.settingsflowViz.par.set。


参数:prepanel
The prepanel function. See xyplot.  
prepanel功能。看到xyplot。


参数:panel
The panel function. See xyplot.  
面板功能。看到xyplot。


参数:channel.x, channel.y
Expressions defining the x and y variables in terms of columns in the data.  Can involve functions or multiple columns from the data, however this usage is discouraged.  
X和Y变量定义的数据列的表达式。可以涉及功能或多个列的数据,然而,这是不鼓励使用。


参数:frames
An environment containing frame-specific data.  
一个环境包含框架的具体数据。


参数:...
More arguments, usually passed on to the underlying lattice methods.  
更多的参数,通常传递到底层的格子方法。


Details

详情----------Details----------

The implementation of xyplot in flowViz is very close to the original lattice version. Concepts like conditioning and the use of panels apply directly to the flow cytometry data. The single fundamental difference is that conditioning variables are not evaluated in the context of the raw data, but rather in the phenoData slot environment (only for the flowSet methods. Thus, we can directly condition on pheotypic variables like sample groups, patients or treatments.
实施xyplotflowViz是非常接近原lattice版本。如空调和使用面板的概念直接应用流式单元仪数据。单一的根本区别在于,调节变量是不计算在原始数据的情况下,而是在phenoData槽环境(只适用于flowSet方法。因此,我们可以直接上pheotypic变量条件喜欢样本组,病人或治疗。

In the formula interface, the primary and secondary variables (separated by the tilde) have to be valid parameter names. Please note that frequently used variants like FSC-H and SSC-H are not syntactically correct R symbols, and need to be wrapped in ` `. E.g., `FSC-H`. For flowSets, the use of a conditioning variable is optional. We implicitely condition on flowFrames and the default is to arrange panels by sample names.
公式中的接口,小学和中学的变量(波浪号隔开)必须是有效的参数名。请注意,如FSC-H和SSC-H是不是语法正确的R符号,需要被包裹在 常用的变种。例如,FSC-H。使用一个调节变量对于flowSets,是可选的。我们implicitely条件flowFrames“默认安排样本名板。


方法----------Methods----------




xyplot signature(x = "flowFrame", data = "missing"): Creates diagnostic time series plots of flow parameter values against time. These plots are useful to detect quality issues in the raw data. If not provided explicitely via the tine argument, the time parameter will be automatically detected. The additional arguments xlab, ylab, nrpoints, and layout are only listed because flowViz provides different defaults. Internally, they are directly passed on to the
xyplotsignature(x = "flowFrame", data = "missing"):创建流参数值与时间的诊断时间序列图。这些图都是有用的检测原始数据的质量问题。如果没有明确地提供通过tine参数,时间参数将被自动检测。额外的参数xlab,ylab,nrpoints,layout因为flowViz提供不同的默认只列出。在内部,他们直接传递到

. Argument type can be a combination of any of the types allowed in lattice       xyplots, or discrete, in which case a smoothed average of the parameter against time is plotted. binSize controls the binning that is used for the smoothing procedure.
。参数type是lattice       xyplots或discrete,在这种情况下,对时间参数的平滑平均绘制允许任何类型的组合。 binSize控制的平滑过程中使用的分级。




xyplot signature(x = "formula", data = "flowFrame"): Creates scatter plots (a.k.a. dot plots) of a pair of FCM channels. Depending on the setting of the smooth argument, the data will be rendered as a partially smoothed density estimate (smooth=TRUE, the default) or as a regular scatter plot with separate points for individual events. The formula interface allows for fairly general plotting, however there are certain limitations on the use of expressions as part of the formulae. Unless you are sure about what you are doing, you should transform the raw data in a separate step using one of the tools in the flowCore package rather than inline using the formula interface. The method allows to superimpose gating results though the filter argument. If smooth=TRUE, we try to add spherical 2D representations of the gates if applicable. For smooth=FALSE, gates are indicated by a grouping mechanism using different point shapes or colors (unless outline is also TRUE, in which case the gate outlines are superimposed in addition to the grouping). Argument margins controls how events on the margins of the measurement range are treated. The default (TRUE) is to discard them from any density estimation and later add them as separate glyphs. See flowViz.par.set for details on controlling graphical
xyplotsignature(x = "formula", data = "flowFrame"):创建一对FCM的渠道散点图(又名点图)。根据smooth参数设置,数据将呈现部分平滑的密度估计(smooth=TRUE,默认),或作为一个独立的个别事件点的定期散点图。公式界面允许相当普遍的图,但是作为公式的一部分表达式的使用有一定的局限性。除非你确定你在做什么,你应该在一个单独的步骤,使用的工具之一flowCore包,而不是使用公式界面内嵌变换的原始数据。该方法允许叠加浇注结果虽然filter说法。如果smooth=TRUE,我们尝试添加二维球面表示,如果适用的大门。 smooth=FALSE,盖茨表示分组使用不同点形状或颜色(除非outline也是TRUE,在这种情况下,门轮廓叠加在分组)的机制。参数margins控制测量范围的边缘上的事件是如何处理。默认(TRUE)是他们放弃任何密度估计,稍后添加它们作为单独的字形。看到flowViz.par.set控制图形的详细信息




xyplot signature(x = "formula", data = "flowSet"): Scatter plots from a flowSet object. We allow for conditioning on variables in the phenoData slot of the flowSet. All additional arguments that apply to the
xyplotsignature(x = "formula", data = "flowSet"):flowSet对象的散点图。我们允许变量phenoData插槽flowSet空调。适用于所有额外的参数,




xyplot signature(x = "formula", data = "view"): Scatter plots from a view object. Depending on the particulars of the view, the method tries to come up with reasonable defaults. Full customization is also available though
xyplotsignature(x = "formula", data = "view"):view对象的散点图。详情的看法不同,该方法试图来合理的默认值。全定制也可尽管




xyplot signature(x = "view", data = "missing"): Scatter plots from a view object. This is the fallback method in the case of absolutely no customization. It serves as
xyplotsignature(x = "view", data = "missing"):view对象的散点图。这是绝对没有定制的情况下的后备方法。它作为




xyplot signature(x = "formula", data = "gateView"): Scatter plots from a gateView object. This allows for customization of the gateView plots but still provides
xyplotsignature(x = "formula", data = "gateView"):gateView对象的散点图。这使得定制gateView图,但仍然提供


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


F. Hahne, D. Sarkar



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

Not all standard lattice arguments will have the intended effect, but many should.  For a fuller description of possible arguments and their effects, consult documentation on lattice.
并非所有标准的晶格参数将产生预期的效果,但很多应该。一个可能的参数和它们的影响有更全面的描述,咨询晶格上的文件。


举例----------Examples----------



data(GvHD)
GvHD <- GvHD[pData(GvHD)$Patient %in% 5:6]

## a bivariate scatterplot[#二元散点图]
## by default ('smooth=TRUE') panel.smoothScatter is used[#默认情况下(“顺利= TRUE”)panel.smoothScatter使用]
xyplot(`FSC-H` ~ `SSC-H`, GvHD[["s5a05"]], nbin = 100,
main="A single flowFrame")

## A non-smooth version of the same data[#非光滑版本相同的数据]
xyplot(`FSC-H` ~ `SSC-H`, GvHD[["s5a05"]], nbin = 100,
main="A single flowFrame", smooth=FALSE)

## A colorful non-smooth version of the same data[#一个丰富多彩的非光滑版本相同的数据]
require(IDPmisc)
colramp <- colorRampPalette(IDPcolorRamp(21))
xyplot(`FSC-H` ~ `SSC-H`, GvHD[["s5a05"]], nbin = 100,
       main="A single flowFrame", smooth=FALSE,
       colramp=colramp, pch=20, cex=0.1)

## Visual artifacts created by the pileup of margin events[#保证金事件的堆积造成的视觉效果]
xyplot(`FSC-H` ~ `SSC-H`, GvHD[["s5a05"]], nbin = 100,
       main="A single flowFrame", margin=FALSE)


## simple bivariate scatter plot (a.k.a. dot plot)[#简单的二元散点图(又名点图)]
## for the whole flowSet, conditioning on Patient and[#的整体flowSet,对病人的调理和]
## Visit[#访问]
xyplot(`SSC-H` ~ `FSC-H` | Patient:Visit, data = GvHD)

## Same bivariate scatter plot with replacing default color[#替换默认颜色的二元同散点图]
require(IDPmisc)
cols <- colorRampPalette(IDPcolorRamp(21))
xyplot(`SSC-H` ~ `FSC-H` | Patient:Visit, data = GvHD, colramp=cols)

## several examples with time on the X axis[随着时间的推移#的几个例子,在X轴]
## first for a flowFrame[#为flowFrame]
xyplot(GvHD[[1]])

## and for flowSets[#为flowSets的]
xyplot(`FSC-H` ~ Time | Visit, GvHD,
       smooth = FALSE, type = "l",
       subset = (Patient == 5))

xyplot(`FSC-H` ~ Time | Patient+Visit, GvHD,
       smooth = FALSE, type = "a",
       strip = FALSE, strip.left = TRUE,
       aspect = "xy")


## combine plots for two channels[#结合两个通道的图]
ssc.time <-

    xyplot(`SSC-H` ~ Time | factor(Patient):factor(Visit), GvHD,
           smooth = FALSE, type = "a",
           strip = FALSE,
           strip.left = strip.custom(horizontal = TRUE),
           par.strip.text = list(lines = 3),
           between = list(y = rep(c(0, 0.5), c(6, 1))),
           scales = list(x = list(axs = "i"), y = list(draw = FALSE)),
           layout = c(1, 14))

fsc.time <-
    xyplot(`FSC-H` ~ Time | factor(Patient):factor(Visit), GvHD,
           smooth = FALSE, type = "a",
           strip = FALSE,
           strip.left = strip.custom(horizontal = TRUE),
           par.strip.text = list(lines = 3),
           between = list(y = rep(c(0, 0.5), c(6, 1))),
           scales = list(x = list(axs = "i"), y = list(draw = FALSE)),
           layout = c(1, 14))

plot(fsc.time, split = c(1, 1, 2, 1))
plot(ssc.time, split = c(2, 1, 2, 1), newpage = FALSE)


## saving plots as variables allows more manipulation[#变量保存的图,让更多的操纵]
plot(update(fsc.time[8:14], layout = c(1, 7)),
     split = c(1, 1, 1, 2))

plot(update(ssc.time[8:14], layout = c(1, 7)),
     split = c(1, 2, 1, 2), newpage = FALSE)


## displaying filters[#显示过滤器]
n2gate <- norm2Filter("SSC-H", "FSC-H")

xyplot(`SSC-H` ~ `FSC-H` | Patient:Visit, data = GvHD,
       filter=n2gate, subset=Patient==5)

xyplot(`SSC-H` ~ `FSC-H` | Patient:Visit,
       data=transform("SSC-H"=asinh,"FSC-H"=asinh) %on% GvHD,
       smooth=FALSE, filter=n2gate, subset=Patient == 5)


n2gate.results <- filter(GvHD, n2gate)

xyplot(`SSC-H` ~ `FSC-H` | Visit, data=GvHD,
       subset=Patient == "6",
       filter=n2gate.results, smooth=FALSE)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-8 13:08 , Processed in 0.029492 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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