img_sub: Create image subsets

Description Usage Arguments Details Value Author(s) References Examples

Description

Create subsets of FCS files and the resulting histogram images.

Usage

1
2
## S4 method for signature 'character'
img_sub(files,transformation=FALSE,ch1="FS.Log",ch2="FL.4.Log",x_start=0,x_end=4095,y_start=0,y_end=4095,xbin=128,maxv=200,width=300,height=300,...)

Arguments

files

Character list of .fcs files. All files have to be in one folder. See the manual for more information about creating the list.

transformation

Character string to define the type of data transformation (default=FALSE). Fore more details type "?read.FCS" into R command line.

ch1

Character string indicating the first channel of the histogram (x-axis) (default="FS.Log"). See the manual for more details.

ch2

Character string indicating the second channel of the histogram (y-axis) (default="FL.4.Log"). See the manual for more details.

x_start

Start of the rectangle gate on the x-axis (default=0). See the manual for more details.

x_end

End of the rectangle gate on the x-axis (default=4095). See the manual for more details.

y_start

Start of the rectangle gate on the y-axis (default=0). See the manual for more details.

y_end

End of the rectangle gate on the y-axis (default=4095). See the manual for more details.

xbin

Number of bins within the histogram (default=128).

maxv

Maximal value of the expressions within the histogram that is set to the highest color value (black) (default=200). See the manual for more details.

width

Width (pixel) of the resulting histogram image (default=300).

height

Height(pixel) of the resulting histogram image (default=300).

...

Additional parameters used for reading the FCS files, creating the PNG images and for plotting. For more details type "?read.FCS", "?png" or "??ggplot2" into R command line.

Details

This method creates subsets of FCS files and the resulting histogram images using the ggplot method of the package "ggplot2" (see reference Wickham 2009). After creating a list containing the names of the FCS files a new folder called "chic_subset" is created in the working directory that contains the subset histogram images. Choose the two channels that are used for plotting on the x/y-axis. Define the start and the end of the rectangle gate of both axes. See the manual for more details.

Value

The img_sub() method creates subsets of the histogram images.

Author(s)

Joachim Schumann joachim.schumann@ufz.de, Christin Koch christin.koch@ufz.de, Ingo Fetzer info.fetzer@stockholmresilience.su.se, Susann Müller susann.mueller@ufz.de

References

H. Wickham. ggplot2: elegant graphics for data analysis. Springer New York,2009.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
require(flowCore)
require(ggplot2)

## Write the subset histogram images of the FCS files that are included 
## to the package in a new subfolder of the working directory
## called "chic_subset"

# Get a list of the filenames of the FCS files
files <- list.files(system.file("extdata",package="flowCHIC"),
full=TRUE,pattern="*.fcs")
# Create subsets
img_sub(files,x_start=200,x_end=3500,y_start=1000,y_end=3000,maxv=160)

flowCHIC documentation built on Nov. 8, 2020, 6:53 p.m.