plotDispEsts: Plot Fitted and Test-wise Dispersion

Description Usage Arguments Value Examples

View source: R/main.plotAlt.R

Description

Plots the countbin-specific estimated dispersion and the fitted dispersion curve.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  plotDispEsts( jscs, ylim, xlim, 
               linecol=c("#0000FF","#FF0000"), 
               pointcol = c("#00009980","#99000080"),
               title.main = "Dispersion Estimates", 
               xlab = "Mean Normalized Coverage", 
               ylab = "Dispersion",
               miniTicks = TRUE,
               pch.MLE = 46, pch.MAP = 1, lwd.fitted = 2,
               par.cex = 1, points.cex = 1, text.cex = 1, lines.cex = 8,
               use.smoothScatter = FALSE, smooth.nbin = 512, nrpoints = 100,
               plot.exon.results = TRUE, 
               plot.junction.results = TRUE, 
               anno.lwd = 2,
               mar = c(4.1,4.1,3.1,1.1),
               show.legends = TRUE, 
               verbose = TRUE, debug.mode = FALSE,
               ... )

Arguments

jscs

A JunctionSeqCountSet. Usually created by runJunctionSeqAnalyses.

Alternatively, this can be created manually by readJunctionSeqCounts. Dispersions and size factors must then be set, usually using functions estimateSizeFactors and estimateJunctionSeqDispersions. Hypothesis tests must be performed by testForDiffUsage.

ylim

The plotting range for the y-axis.

xlim

The plotting range for the x-axis.

linecol

Character vector of length 2. The line color to use for the fit line. If the fits were performed separately for exons and junctions, the junction line will be drawn with the second color.

pointcol

Character vector of length 2. The point color to use for the final dispersions. If the fits were performed separately for exons and junctions, the junction points will be drawn with the second color.

title.main

The main title of the plot.

xlab

The label for the x-axis.

ylab

The label for the y-axis.

miniTicks

Whether or not to plot smaller ticks at the tenth-decades.

par.cex

The base cex value to be passed to par() immediately before all plots are created. See par.

points.cex

The character expansion value for the plotted points.

text.cex

The character expansion value for the annotation text (labels, etc).

lines.cex

The character expansion value for lines. What this means seems to vary depending on the plotting device.

pch.MLE

Numeric. The pch code for the MLE (ie single-feature) dispersion estimate. The default is a small point.

pch.MAP

Numeric. The pch code for the MAP (ie. final) dispersion estimate. The default is a circle.

lwd.fitted

Numeric. The width of the dispersion fit line(s).

use.smoothScatter

Logical. If TRUE, features will be ploted with density shading rather than having each point plotted.

smooth.nbin

The number of bins to smooth, for the density plot, if use.smoothScatter is TRUE.

nrpoints

The number of extra points to plot, if use.smoothScatter is TRUE.

plot.exon.results

Logical. If TRUE, plot results for exons. Technically speaking, JunctionSeq can be used to do DEXSeq-style analyses on exon partitions. However this functionality is for advanced users only.

plot.junction.results

Logical. If TRUE, plot results for splice junctions. For advanced users only.

anno.lwd

The lwd value to be passed to lines, box, axis, and similar.

mar

The margin sizes, expressed in lines. see link{par}.

show.legends

Logical. If TRUE, display legends.

verbose

if TRUE, send debugging and progress messages to the console / stdout.

debug.mode

if TRUE, send even more debugging and progress messages to the console / stdout.

...

Additional options to pass to plotting functions, particularly graphical parameters.

Value

This is a side-effecting function, and does not return a value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
data(exampleDataSet,package="JctSeqData");
plotDispEsts(jscs);

## Not run: 
########################################
#Set up example data:
decoder.file <- system.file(
                  "extdata/annoFiles/decoder.bySample.txt",
                  package="JctSeqData");
decoder <- read.table(decoder.file,
                  header=TRUE,
                  stringsAsFactors=FALSE);
gff.file <- system.file(
            "extdata/cts/withNovel.forJunctionSeq.gff.gz",
            package="JctSeqData");
countFiles <- system.file(paste0("extdata/cts/",
     decoder$sample.ID,
     "/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz"),
     package="JctSeqData");
######################
#Run example analysis:
jscs <- runJunctionSeqAnalyses(sample.files = countFiles,
           sample.names = decoder$sample.ID,
           condition=factor(decoder$group.ID),
           flat.gff.file = gff.file,
           analysis.type = "junctionsAndExons"
);
########################################

#Plot dispersions:
plotDispEsts(jscs);


## End(Not run)

JunctionSeq documentation built on April 28, 2020, 7:57 p.m.