Last data update: 2014.03.03

R: Fortify a model into flowSet object
fortify_fsR Documentation

Fortify a model into flowSet object

Description

The method provides a universe interface to convert a generic R object into a flowSet useful for ggcyto

Usage

fortify_fs(model, data, ...)

## S3 method for class 'flowSet'
fortify_fs(model, data, ...)

## Default S3 method:
fortify_fs(model, data, ...)

## S3 method for class 'flowFrame'
fortify_fs(model, data, ...)

## S3 method for class 'GatingSet'
fortify_fs(model, data, ...)

Arguments

model

flow object(flowFrame or GatingSet) to be converted to flowSet. when it is a GatingSet, it must contain the subset information stored as 'subset' attribute.

data

original dataset, if needed

...

other arguments passed to methods

Value

a flowSet/ncdfFlowSet object

Examples

data(GvHD)
fr <- GvHD[[1]]
fortify_fs(fr)

dataDir <- system.file("extdata",package="flowWorkspaceData")
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
attr(gs, "subset") <- "CD4"
fortify_fs(gs)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ggcyto)
Loading required package: ggplot2
Loading required package: flowCore
Loading required package: ncdfFlow
Loading required package: flowViz
Loading required package: lattice
Loading required package: RcppArmadillo
Loading required package: BH
Loading required package: flowWorkspace
Loading required package: gridExtra
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ggcyto/fortify_fs.Rd_%03d_medium.png", width=480, height=480)
> ### Name: fortify_fs
> ### Title: Fortify a model into flowSet object
> ### Aliases: fortify_fs fortify_fs.GatingSet fortify_fs.default
> ###   fortify_fs.flowFrame fortify_fs.flowSet
> 
> ### ** Examples
> 
> data(GvHD)
> fr <- GvHD[[1]]
> fortify_fs(fr)
A flowSet with 1 experiments.

  column names:
  FSC-H SSC-H FL1-H FL2-H FL3-H FL2-A FL4-H Time
> 
> dataDir <- system.file("extdata",package="flowWorkspaceData")
> gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
loading R object...
loading tree object...
Done
> attr(gs, "subset") <- "CD4"
> fortify_fs(gs)
An ncdfFlowSet with 1 samples.
NCDF file : /home/ddbj/local/lib64/R/library/flowWorkspaceData/extdata/gs_manual/file43d7216f817c.nc 
An object of class 'AnnotatedDataFrame'
  rowNames: CytoTrol_CytoTrol_1.fcs
  varLabels: name
  varMetadata: labelDescription

  column names:
    FSC-A, FSC-H, FSC-W, SSC-A, <B710-A>, <R660-A>, <R780-A>, <V450-A>, <V545-A>, <G560-A>, <G780-A>, Time

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>