dnaplot: Densityplot for DNA Profiles

Description Usage Arguments Details Value Examples

View source: R/dnaplot.R

Description

A wrapper for flowViz::densityplot() with defaults for DNA profiles.

Usage

1
dnaplot(..., chan = NULL, bw = "SJ", n = 512, adjust = 1)

Arguments

...

Arguments to be handed to flowViz::densityplot() or a flowFrame or flowSet

chan

An option character scalar identifying the data to be plotted if ... is a flowFrame or flowSet

bw, n, adjust

Parameters passed to the kernel density function stats::density() to increase the resolution of the plot with default values of bw = "SJ", n = 512 and adjust = 1. The option na.rm = TRUE will be included in all cases

Details

This is a convenience function with parameters more suited for typical DNA profiles by using the bandwidth algorithm of Sheather & Jones in bw.SJ with the adjustment in adjust and using more points (512 rather than 50) to determine the density.

The call effectively executes the following:

1
densityplot(..., dargs = list(bw = bw, n = n, adjust = adjust, na.rm = TRUE))

Except for the lazy case of calling it with first argument a flowSet or flowFrame. In this case the function guesses the most likely chan parameter (in order) from FL2.A, FL3.A, FL2.H or FL3.H. Alternatively, the channel name can be passed in chan and the call now becomes:

1
  densityplot(~ chan, ..., dargs = list(bw = bw, n = n, adjust = adjust, na.rm = TRUE))

Value

Plot the data and invisibly return the lattice object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# load and filter example data with 16 flowFrames
  fs <- readSet(system.file("extdata", "synch/", package = "flowExtra"))
  fs <- Subset(fs, boundaryFilter("FL2.A"))
# default density parameters from flowViz 
  densityplot(~ FL2.A, fs, xlim = c(50, 500),
    main = "Default parameters for densityplot")
# revised density parameters 
  dnaplot(~ FL2.A, fs, xlim = c(50, 500),
    main = "Refined parameters for 'dnaplot'")
# lazy use if "FL2.A" is present
  dnaplot(fs)

ornelles/flowExtra documentation built on March 1, 2020, 9:33 a.m.