"FCS-class" {rflowcyt}R Documentation

Class "FCS" : Flow Cytometry Standard

Description

This class represents objects read from raw binary Flow Cytometry Standard (FCS) files. These files contain a data portion, consisting of immunofluorescence and other column variables for each cell or row observation, and a metadata portion, which contains information such as parameter shortnames, longnames, ranges and data dimensions as well as file information.

Objects from the Class

Objects can be created by calls of the form new("FCS", ...).

Slots

data:
Object of class "matrix" which holds integer data such that the columns are the variables (usually immunofluorescence measurements) and the rows are the cell observations.
metadata:
Object of class "FCSmetadata" which holds information about the file, data, and column variables among other items in the header of the original raw FCS binary file.

Methods

"["
signature(x = "FCS"): Extracts the data
"[<-"
signature(x = "FCS"): Replaces or sets the data
"[["
signature(x = "FCS"): Extracts the metadata
"[[<-"
signature(x = "FCS"): Replaces or sets the metadata
addParameter
signature(x = "FCS", colvar = "vector"): Adds a column parameter to the data
checkvars
signature(x = "FCS"): Checks the compatibility of the metadata against the data dimensions and column/parameter names and ranges
coerce
signature(from = "FCS", to = "matrix"): Returns the data as a matrix
coerce
signature(from = "FCS", to = "data.frame"): Returns the data as a data.frame
coerce
signature(from = "matrix", to = "FCS"): Returns an FCS object with data and default prototype metadata
coerce
signature(from = "data.frame", to = "FCS"): Returns an FCS object with data and default prototype metadata
dim.FCS
signature(x = "FCS") : Returns the dimensions (ie, the number of rows and columns respectively) of the data matrix; the output is a vector
equals
signature(x = "FCS", y = "FCS"): Compares the equality of two objects in terms of data and metadata correspondence
fixvars
signature(x = "FCS"): Sets the discrepant metadata slots to values in from the data
fluors
signature(x = "FCS"): Returns the complete data portion of the object
metaData
signature(x = "FCS"): Returns the complete metadata portion of the object
"plot-methods"
signature(x = "FCS", y = "missing"): Plots the object as a pairs plot (with rectangular binned contour-image plots or hexagonal binned image plots) or as a joint or marginal image parallel coordinates plot
"print-methods"
signature(x = "FCS"): Prints a brief description about the original filename, dimensions of the data, and the original status of the current object's data
"show-methods"
signature(object = "FCS"): Prints a brief description about the original filename, dimensions of the data, and the original status of the current object's data
"summary-methods"
signature(object = "FCS"): Summaries the data's dimensions, five-number summaries on the column parameters, the information contained in the metadata

Note

The function read.FCS is used to read in a raw binary FCS files and output a "FCS-class" object.

Author(s)

A.J. Rossini, J.Y. Wan, and Zoe Moodie

References

Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer Series in Statistics : New York, 2001. pp.279-283.

Jerome H. Friedman and Nicholas I. Fisher. Bump Hunting in High-Dimensional Data. Tech Report. October 28, 1998.

J. Paul Robinson, et al. Current Protocols in Cytometry. John Wiley & Sons, Inc : 2001.

Mario Roederer and Richard R. Hardy. Frequency Difference Gating: A Multivariate Method for Identifying Subsets that Differe between Samples. Cytometry, 45:56-64, 2001.

Mario Roederer and Adam Treister and Wayne Moore and Leonore A. Herzenberg. Probability Binning Comparison: A Metric for Quantitating Univariate Distribution Differences. Cytometry, 45:37-46, 2001.

Keith A. Baggerly. Probability Binning and Testing Agreement between Multivariate Immunofluorescence Histograms: Extending the Chi-Squared Test. Cytometry, 45:141-150, 2001.

See Also

read.FCS, "FCSgate-class", "FCSsummary-class", "FCSmetadata-class", "plot-methods", "print-methods", "show-methods", "summary-methods", "coerce-methods", "[-methods", "[[-methods", "[<--methods", "[[<--methods", checkvars, fixvars, equals, addParameter, fluors, metaData, dim.FCS

Examples


## a default FCS object
default.FCSobj<-new("FCS")

## making my own FCS object
## first making up the data
dummy.data<-matrix(1:1000, ncol=10)
colnames(dummy.data)<-paste("foo", 1:10, sep="")

## second making up the metadata
##   default FCSmetadata
dummy.metadata<-new("FCSmetadata")
##   user-defined metadata
foo.metadata<-new("FCSmetadata", mode="none", size=100, nparam=10,
shortnames=paste("V", 1:10, sep=""), longnames=colnames(dummy.data),
paramranges=unlist(apply(dummy.data, 2, max)), filename="",
objectname="foo.FCSobj", fcsinfo=list("extraInfo1"="dummy FCS",
"extraInfo2"=9:20))

foo.FCSobj<-new("FCS", data=dummy.data, metadata=foo.metadata)

dummy.FCSobj<-new("FCS", data=matrix(), metadata=dummy.metadata)

## extraction of the metadata
foo.FCSobj[["size"]]
## replacement of the metadata
 ## introduce an error in the column length
foo.FCSobj[["nparam"]]<-0

## extraction of the data

first.ten.obs<-foo.FCSobj[1:10,]
## replacement of the data
foo.FCSobj[1:10,]<-matrix(1:100, ncol=10)
## addParameter
foo.FCSobj<-addParameter(foo.FCSobj, 1:100, shortname="newvar",
longname="newlymadevariable", use.shortname=FALSE)

## replacement of the metadata
 ## introduce an error in the column length
foo.FCSobj[["nparam"]]<-0

## checkvars
correct.status.is.FALSE<-checkvars(foo.FCSobj)
## coerce FCS to matrix
coerced.mat<-as(foo.FCSobj, "matrix")
is(coerced.mat, "matrix")
## coerce FCS to data.frame
coerced.df<-as(foo.FCSobj, "data.frame")
is(coerced.df, "data.frame")
## coerce matrix to FCS
FCSobj1<-as(coerced.mat, "FCS")
is(FCSobj1, "FCS")
## coerce data.frame to FCS
FCSobj2<-as(coerced.df, "FCS")
is(FCSobj2, "FCS")

##obtaining the dimensions of the data
dim.FCS(FCSobj2)

## equals

## should be TRUE
equals(FCSobj1, FCSobj2, check.filename=TRUE, check.objectname=TRUE)

## default does not check filename or objectname equality
## should be FALSE
equals(foo.FCSobj, dummy.FCSobj)

## fixvars
foo.FCSobj<-fixvars(foo.FCSobj)
## fluors
data.mat<-fluors(foo.FCSobj)
## metaData
metadata.ls<-metaData(foo.FCSobj)
## plot
## not interesting to plot dummy data

## default plot is pairs.CSP <pairs plot with Contour-images>
## plot(foo.FCSobj)

## can do joint image.parallel.coordinates pairs plots
## plot(foo.FCSobj, image.parallel.plot=TRUE)

## can do marginal image parallel coordinates pairs plots
## plot(foo.FCSobj, image.parallel.plot=TRUE, joint=FALSE)

## print
print(foo.FCSobj)
foo.FCSobj

## show
show(foo.FCSobj)

## summary
summary(foo.FCSobj)
summary(dummy.FCSobj)

[Package rflowcyt version 1.10.1 Index]