gene.list
parameter, and will plot those specific genes.
Note that this function has MANY parameters, allowing the user to tweak the appearance of the plots to suit their particular needs and preferences.
Don't be daunted: the default parameters are probably fine for most purposes.
buildAllPlots(jscs, outfile.prefix = "./", gene.list = NULL, FDR.threshold = 0.01, max.gene.ct, method.selectionCriterion = c("feature-pAdjust", "genewise-pAdjust"), use.plotting.device = c("png","CairoPNG","svg", "tiff","cairo_ps","custom"), sequencing.type = c("paired-end","single-end"), use.vst=FALSE,use.log = TRUE, exon.rescale.factor = 0.3, subdirectories.by.type = TRUE, ma.plot=TRUE, variance.plot=TRUE, with.TX=TRUE,without.TX=TRUE, expr.plot=TRUE,normCounts.plot=TRUE, rExpr.plot=TRUE,rawCounts.plot=FALSE, colorRed.FDR.threshold = FDR.threshold, colorList=list(), plot.gene.level.expression = TRUE, plot.exon.results, plot.junction.results, plot.novel.junction.results, plot.untestable.results = FALSE, plot.lwd=3, axes.lwd = plot.lwd, anno.lwd = plot.lwd, gene.lwd = plot.lwd / 2, par.cex = 1, anno.cex.text = 1, anno.cex.axis = anno.cex.text, anno.cex.main = anno.cex.text * 1.2, drawCoordinates = TRUE, yAxisLabels.inExponentialForm = FALSE, show.strand.arrows = 1, graph.margins = c(2, 3, 3, 3), base.plot.height = 12, base.plot.width = 12, base.plot.units = "in", GENE.annotation.relative.height = 0.15, TX.annotation.relative.height = 0.05, CONNECTIONS.relative.height = 0.1, SPLICE.annotation.relative.height = 0.1, TX.margins = c(0,0.5), autoscale.height.to.fit.TX.annotation = TRUE, autoscale.width.to.fit.bins = 35, plotting.device.params = list(), number.plots = FALSE, name.files.with.geneID = TRUE, condition.legend.text, include.TX.names = TRUE, draw.start.end.sites = TRUE, openPlottingDeviceFunc, closePlottingDeviceFunc, writeHTMLresults = TRUE, html.cssFile, html.cssLink, html.imgFileExtension, html.plot.height = 90, html.plot.height.units = "vh", html.compare.results.list = NULL, minimalImageFilenames = writeHTMLresults, verbose=TRUE, debug.mode = FALSE, INTERNAL.VARS = list(), ...)
JunctionSeqCountSet
. Usually created by runJunctionSeqAnalyses
.
Alternatively, this can be created manually by readJunctionSeqCounts
.
However in this case a number of additional steps will be necessary:
Dispersions and size factors must then be
set, usually using functions estimateSizeFactors
and
estimateJunctionSeqDispersions
. Hypothesis tests must
be performed by testForDiffUsage
. Effect sizes and parameter
estimates must be created via estimateEffectSizes
.
TRUE
, all plots will be scaled via a variance stabilizing transform.TRUE
, all plots will be log-scaled.exonRescaleFunction
parameter, which is
passed to plotJunctionSeqResultsForGene
.
TRUE
, then subdirectories will be created in the outfile.prefix directory, containing each plot type.
plotJunctionSeqResultsForGene
TRUE
, gene-level expression (when applicable) will be plotted beside the sub-element-specific expression in a small seperate plotting box.
For the "relative expression" plots the simple mean normalized expression will be plotted (since it doesn't make sense to plot something relative to itself).
TRUE
, plot results for exons. By default everything that was tested will be plotted.TRUE
, plot results for splice junctions. By default everything that was tested will be plotted.TRUE
, plot results for novel splice junctions. If false, novel splice junctions will be ignored. By default everything that was tested will be plotted.TRUE
, plots splice junctions that had coverage that was too low to be tested.
Note that, in general, only normCounts and rawCounts plots will have non-NA
values for untestable counting bins.
par
.
par
.
par
.
par
.
TRUE
, then the y-axis will be labelled in exponential form.1
(the default) then the arrow will extend from the end of the gene drawing, if it is greater than 1
then arrows will be drawn
along the gene length. If it is 0
or NA
then arrows will not be drawn.
with.TX
parameter is TRUE
), this sets the height of each transcript, as a fraction of the height of the main graph. By default it is 2.5 percent.
TRUE
) (the default),
all plots that include transcripts will be expanded vertically to fit the additional transcripts. This maintains the same appearance and
aspect ratio of the main graph area, but means that the height of the plot will differ between genes when TX are included.
This parameter can be used to override that behavior if a specific figure size is desired.
If FALSE
, then the height of the entire
output image will always be equal to base.plot.height
.
NA
.
factor(condition)
. Each element
should be named with one of the values from factor(condition)
, and should contain the label. They will be listed in this order in the figure legend.
TRUE
, then for the plots that include the annotated transcript, the transcript names will be listed. The labels will be drawn at half the size of anno.cex.text
.
TRUE
, then transcript start/end sites will be marked on the main gene annotation.
html.plot.height
parameter. The default is "vh", which sets the height relative to the available max height.
builtAllPlots
separately for each analysis.
The outfile.prefix
for each
run must be a sub-directory of the same parent directory. The html.compare.results.list
must be a named list of these subdirectories.
names(html.compare.results.list)
must be the title of each analysis as you want it to appear in the navigation links.
Note: This parameter is incompatible with the number.plots
option.
TRUE
, then the image files will not include the gene names, but
instead will be numbered in order. The html files will still have the full
length names. This option was added because many web host servers will refuse
to host image files whose length exceeds 32 characters. By default
this option will be TRUE
iff writeHTMLresults is TRUE
.
buildAllPlotsForGene
, plotJunctionSeqResultsForGene
, or graphical parameters passed to plotting functions.
data(exampleDataSet,package="JctSeqData");
buildAllPlots(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"
# );
# ########################################
#
# #Generate all plots and the html index
# # Save them as pngs to the current directory:
# buildAllPlots(jscs);
#
# ## End(Not run)
Run the code above in your browser using DataLab