plotCtCategory {HTqPCR} | R Documentation

## Summarising the feature categories for Ct values.

### Description

This function will provide a summary of the `featureCategory` for a qPCRset. Focus can either be on categories across samples, or across features.

### Usage

    plotCtCategory(q, cards = TRUE, by.feature = FALSE, stratify, col, xlim, main, ...)

### Arguments

`q` | object of class qPCRset.
`cards` | integers, the number of the cards (samples) to plot.
`by.feature` | logical, should the categories be summarised for features rather than samples. See details.
`stratify` | character string, either "type" or "class" indicating if the categories should be stratified by `featureType` or `featureClass` of `q`. Ignored if `by.features` is TRUE.
`col` | vector with the colours to use for the categories. Default is green for "OK", yellow for "Unreliable" and red for "Undetermined". See details.
`xlim` | vector, the limits of the x-axis. If `by.feature` is FALSE, this can be used to adjust the size of the barplot to fit in the colour legend.
`main` | character string, the title of the plot.
`...` | further arguments passed to `barplot` or `heatmap`.

### Details

This function is for generating two different types of plot. If `by.feature=FALSE` the number of each `featureCategory` will be counted for each card, and a barplot is made. If however `by.feature=TRUE`, then the categories for each feature across the selected cards will be clustered in a heatmap.

The colours given in `col` correspond to all the unique categories present in the entire `featureCategory` of `q`, even categories not represented for the samples selected by `cards`. Categories are sorted alphabetically, and colours assigned accordingly.

For `by.feature=TRUE` the plot can be modified extensively using calls to the underlying `heatmap` function, such as setting `cexRow` to adjust the size of row labels.

### Value

A figure is produced on the current graphics device.

### Author(s)

Heidi Dvinge

### See Also

`setCategory`, and `heatmap` for the underlying plotting function for `by.feature=TRUE`.

### Examples

    # Load example preprocessed data
    data(qPCRpros)
    # Plot categories for samples
    plotCtCategory(qPCRpros)
    plotCtCategory(qPCRpros, cards=1:3, stratify="class")
    # Categories for features
    plotCtCategory(qPCRpros, by.feature=TRUE)

[Package HTqPCR version 1.42.0 Index]