plotMA.CD {baySeq} | R Documentation

## 'MA'-plot for count data.

### Description

This function creates an MA-plot from two sets of samples. For those data where the log-ratio is infinite (because in one set of sample data all observed counts are zero), we plot instead the log-values of the other group.

### Usage

    plotMA.CD(cD, samplesA, samplesB, normaliseData = TRUE, scale = NULL,
    xlab = "A", ylab = "M", ...)

### Arguments

`cD` | A `countData` object.
`samplesA` | Either a character vector, identifying sample set A by either replicate name or sample name, or a numerical vector giving the columns of data in the `'countData'` object that forms sample set A. See Details.
`samplesB` | Either a character vector, identifying sample set B by either replicate name or sample name, or a numerical vector giving the columns of data in the `'countData'` object that forms sample set B. See Details.
`normaliseData` | Should the data be normalised by library size before computing log-ratios? Defaults to TRUE.
`scale` | If given, defines the scale on which the log-ratios will be plotted. Defaults to NULL, implying that the scale will be calculated by the function.
`xlab` | Label for the X-axis. Defaults to "A".
`ylab` | Label for the Y-axis. Defaults to "M".
`...` | Any other parameters to be passed to the `plot` function.

### Details

The samples sets can be identified either by a numeric vector which specifies the columns of data from the `countData` object 'cD', or by a character vector. If a character vector is used, the members of the character vector will first be searched for in the `@replicates` slot of the 'cD' object. Any members of the vector not found in the replicates slot, will be searched for in the column names of the `@data` slot of the 'cD' object. Different classes of vector can be used for 'samplesA' and 'samplesB', as shown in the example below.

### Value

Plotting function.

### Author(s)

Thomas J. Hardcastle

### See Also

`countData`

### Examples

    data(simData)

    replicates <- c("simA", "simA", "simA", "simA", "simA", "simB", "simB", "simB", "simB", "simB")
    groups <- list(NDE = c(1,1,1,1,1,1,1,1,1,1), DE = c(1,1,1,1,1,2,2,2,2,2))
    CD <- new("countData", data = simData, replicates = replicates, groups = groups)

    #estimate library sizes for countData object
    libsizes(CD) <- getLibsizes(CD)

    #MA-plot comparing replicate groups
    plotMA.CD(CD, samplesA = "simA", samplesB = 6:10)

[Package baySeq version 2.18.0 Index]