R: extract a 'flowFrame' object from 'ncdfFlowSet'
[[,ncdfFlowSet,ANY-method
R Documentation
extract a flowFrame object from ncdfFlowSet
Description
Simliar to [[, and there are cerntain ways to
reduce the disk IO and optimize the speed.
Usage
## S4 method for signature 'ncdfFlowSet,ANY'
x[[i, j, use.exprs = TRUE, ...]]
## S4 method for signature 'ncdfFlowList,numeric'
x[[i, j, ...]]
## S4 method for signature 'ncdfFlowList,logical'
x[[i, j, ...]]
## S4 method for signature 'ncdfFlowList,character'
x[[i, j, ...]]
Arguments
x
a ncdfFlowSet or ncdfFlowList
i
a numeric or character used as sample index
j
a numeric or character used as channel index
use.exprs
a logical scalar indicating whether to read the actual data from cdf
...
other arguments. not used.
Examples
data(GvHD)
nc <- ncdfFlowSet(GvHD[1:2])
samples <- sampleNames(nc)
sn <- samples[1]
#return the entire flowFrame
fr <- nc[[sn]]
#access the flowFrame meta data without loading the raw event data from disk
nc[[sn, use.exprs = FALSE]]
#only read a subset of channels (more efficient than reading entire data set)
nc[[sn, 1:2]]
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(ncdfFlow)
Loading required package: flowCore
Loading required package: flowViz
Loading required package: lattice
Loading required package: RcppArmadillo
Loading required package: BH
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ncdfFlow/extractFlowFrame.Rd_%03d_medium.png", width=480, height=480)
> ### Name: [[,ncdfFlowSet,ANY-method
> ### Title: extract a 'flowFrame' object from 'ncdfFlowSet'
> ### Aliases: [[,ncdfFlowList,character,missing-method
> ### [[,ncdfFlowList,character-method [[,ncdfFlowList,logical-method
> ### [[,ncdfFlowList,numeric-method [[,ncdfFlowSet,ANY-method
>
> ### ** Examples
>
> data(GvHD)
> nc <- ncdfFlowSet(GvHD[1:2])
write s5a01 to empty cdf slot...
write s5a02 to empty cdf slot...
> samples <- sampleNames(nc)
> sn <- samples[1]
> #return the entire flowFrame
> fr <- nc[[sn]]
>
> #access the flowFrame meta data without loading the raw event data from disk
> nc[[sn, use.exprs = FALSE]]
flowFrame object 's5a01'
with 0 cells and 0 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-Height 1024 0 1023
$P2 SSC-H SSC-Height 1024 0 1023
$P3 FL1-H CD15 FITC 1024 1 10000
$P4 FL2-H CD45 PE 1024 1 10000
$P5 FL3-H CD14 PerCP 1024 1 10000
$P6 FL2-A <NA> 1024 0 1023
$P7 FL4-H CD33 APC 1024 1 10000
$P8 Time Time (51.20 sec.) 1024 0 1023
153 keywords are stored in the 'description' slot
>
> #only read a subset of channels (more efficient than reading entire data set)
> nc[[sn, 1:2]]
flowFrame object 's5a01'
with 3420 cells and 2 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-Height 1024 0 1023
$P2 SSC-H SSC-Height 1024 0 1023
153 keywords are stored in the 'description' slot
>
>
>
>
>
> dev.off()
null device
1
>