plot.GateFinder: plot.GateFinder

Description Usage Arguments Value Author(s) Examples

View source: R/AllMethods.R

Description

Creates a scatter plot for each of the gating steps.

Usage

1
2
## S3 method for class 'GateFinder'
plot(x, y, ncolrow=c(1,max(targetpop)), targetpop=NULL, beta=NULL,  cexs=NULL, cols=NULL, subsample=length(targetpop), max.iter=length(y@gates), pot=TRUE, xlim=NULL, ylim=NULL, asinh.axis=FALSE, ...)

Arguments

x

A flowFrame or an expression matrix in which columns are markers and rows are cells.

y

A GatingProjection object.

ncolrow

A vector of length 2 indicating the desired number of rows and columns in the plot.

targetpop

The target cell type.

beta

A positive real value which control the trade-off between precision and recall in the F-measure calculation. Values smaller than 1 (and closer to 0) emphasize recall values and values larger than 1 emphasize precision.

cexs

A vector of length 3 indicating the point sizes for 1-previously excluded cells 2-non-selected cells 3-selected cells.

cols

A vector of length 3 indicating the point colors for 1-previously excluded cells 2-non-selected cells 3-selected cells.

subsample

The number of randomized runs (integer). The results from the best (or median) randomized run will be used. See selection.criteria).

max.iter

A boolean controling weather the gating strategy calculated using a random subset of the cells should be applied to all cells or not.

pot

A boolean value. If true, the points of interest will be ploted on top of other points to increase visibility.

xlim

Static x-axis limits for the plots (vector of length 2).

ylim

Static y-axis limits for the plots (vector of length 2).

asinh.axis

A boolean value indicating if asinh axis ticks should be plotted (usually used for mass cytometry data).

...

Other arguments passed to the plot function.

Value

Plot

A GateFinder plot.

Author(s)

Nima Aghaeepour <naghaeep@gmail.com> and Erin F. Simonds <erin.simonds@gmail.com>.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
library(flowCore)

data(LPSData) 
##Select the target population. In this case cells with those with a pP38 expression (dimension 34) of higher than 3.5.
targetpop <- (exprs(rawdata)[,34]>3.5)

##Subset the markers that should be considered for gating.
x=exprs(rawdata)[,prop.markers]
colnames(x)=marker.names[prop.markers]

##Run GateFinder.
ans=GateFinder(x, targetpop)

##Make the plots.
plot(x, ans, c(2,3), targetpop)
plot(ans)


##Alternatively, using a flowFrame:
x=new('flowFrame', exprs=x)
ans=GateFinder(x, targetpop)

##Now you can use the gates and filters to subset the flowFrame. E.g.:
split(x, ans@flowEnv$Filter2)

##This function relies on an EXPERIMENTAL feature in flowUtils. Please be cautious when replying on this.
##Don't run without the optional flowUtils package installed.
##To write the gates into a GatingML file:
##library(flowUtils)
##write.gatingML(ans@flowEnv, 'GatingML.xml')

GateFinder documentation built on Nov. 8, 2020, 7:53 p.m.