Learn R Programming

alpine (version 0.99.1)

plotGC: Plot the fragment GC bias over samples

Description

Plots smooth curves of the log fragment rate over fragment GC content.

Usage

plotGC(fitpar, model, col, lty, ylim, knots = c(0.4, 0.5, 0.6), bk = c(0, 1), gc.range = NULL, return.type = 0)

Arguments

fitpar
a list of the output of fitBiasModels over samples
model
the name of one of the models
col
a vector of colors
lty
a vector of line types
ylim
the y limits for the plot
knots
the knots for the spline
bk
the boundary knots for the spline
gc.range
a numeric of length two, the range of the fragment GC content. By default, [.2,.8] for plotting and [0,1] for returning a matrix
return.type
a numeric, either 0: make a plot, 1: skip the plot and return a matrix of log fragment rate, 2: skip the plot and return a matrix of probabilities

Value

Either plot, or if return.type is 1 or 2, a matrix

Examples

Run this code

# fitpar was fit using identical code
# as found in the vignette, except with
# 25 genes, and with fragment size in 80-350 bp
data(preprocessedData)
perf <- rep(1:2, each=2)
plotGC(fitpar, "all", col=perf)

Run the code above in your browser using DataLab