plotFeatures {transcriptR} | R Documentation

## plotFeatures

### Description

Visualize the relations between predictors and response variable ('tssOverlap').

### Usage

    plotFeatures(object, plot.type = c("box", "density"), feature, ncol, xlab,
      ylab, color = c("#E41A1C", "#377EB8"), alpha = 1)

    ## S4 method for signature 'ChipDataSet'
    plotFeatures(object, plot.type = c("box", "density"),
      feature, ncol, xlab, ylab, color = c("#E41A1C", "#377EB8"), alpha = 1)

### Arguments

`object` | A `ChipDataSet` object.
`plot.type` | One of ["box", "density"]. Default: "box"
`feature` | Feature to plot. By default, all the features are plotted.
`ncol` | `Numeric`. Arrange individual plots in columns. By default, the number of columns correspond to the number of features used for plotting.
`xlab` | `Character`. Title of the x-axis
`ylab` | `Character`. Title of the y-axis.
`color` | A character vector of length two. Default: ["#E41A1C","#377EB8"].
`alpha` | Color transparency. In a range [0, 1]. Default: 1.

### Details

In order to discriminate between functional or gene associated peaks and non-functional or background peaks, each peak in the data set is characterized by several features. Moreover, the user might supply her/his own list of features with the `addFeature`. Prior to fitting the logistic model, the relations between predictors and response variable (tssOverlap) can be explored with `plotFeatures`. Based on the plots, poor predictors can be excluded from the analysis to improve the model fit.

### Value

ggplot2 object.

### Author(s)

Armen R. Karapetyan

### See Also

`constructCDS`

### Examples

    ### Load ChipDataSet object
    data(cds)

    ### The data can be plotted in two ways
    ### As a boxplot
    plotFeatures(object = cds, plot.type = "box")

    ### Or as a density plot
    plotFeatures(object = cds, plot.type = "density")

    ### Additionally, only the subset of features can be shown
    plotFeatures(object = cds, plot.type = "box", feature = c("pileup", "length"))

    ### The position of the graphs on the plot, can be adjusted by 'ncol' argument
    plotFeatures(object = cds, plot.type = "box", ncol = 2)

[Package transcriptR version 1.14.0 Index]