densityPlot {eegc} | R Documentation

## Quantify Genes and Corresponding ED ratios in Each Category

### Description

Quantify genes in each gene category and their expression difference (ED) ratios in a density plot.

### Usage

    densityPlot(ratio, color = NULL, main = NA, xlab = NA, ylab = "Density",
    legend.labels = NULL, shade = TRUE, transparency = TRUE, proportion = TRUE,
    out.file = NULL, ...)

### Arguments

`ratio` | a list of ED ratios for five gene categories, alternatively output by `categorizeGene`.
`color` | vector of colors for the five gene categories.
`main, xlab, ylab` | the overall title, tile for x axis, and title for y axis, see `title`.
`legend.labels` | vector of labels for the legend.
`shade` | logical to determine if the five categories are filled with shades.
`transparency` | logical to determine if the density plot is transparent.
`proportion` | logical to determine whether the proportion of each category genes over the all genes is drawn on the density plot.
`out.file` | a character string naming the output file with density plot.
`...` | parameters in `plot`.

### Value

a density plot

### Examples

    data(cate.ratio)
    names(cate.ratio)
    # make the extreme ED ratios in Reversed and Over categories to the median values
    reverse = cate.ratio[[1]]
    over = cate.ratio[[5]]
    reverse[reverse[,1] <= median(reverse[,1]), 1]  = median(reverse[,1])
    over[over[,1] >= median(over[,1]),1] = median(over[,1])
    cate.ratio[[1]] = reverse
    cate.ratio[[5]] = over

    # densityPlot(cate.ratio, xlab = "ED ratio", ylab = "Density", proportion = TRUE)

[Package eegc version 1.6.1 Index]