makeMultiPlot {QoRTs}R Documentation

Generating summary multi-plots

Description

Creates a large multi-frame summary plot, or a report PDF file.

Usage

  makeMultiPlot.basic(res,
                      outfile, 
                      outfile.dir = "./",
                      outfile.prefix = "plot-basic", 
                      outfile.ext, 
                      plotter.params = list(), 
                      plot.device.name = "curr", 
                      plotting.device.params = list(),
                      verbose = TRUE, 
                      debugMode, 
                      rasterize.large.plots, 
                      rasterize.medium.plots,
                      raster.height = 1050, 
                      raster.width = 1050,
                      separatePlots = FALSE,
                      exclude.autosomes.chrom.rate.plot = TRUE,
                      chromosome.name.style = "UCSC",
                      fig.res = 150, fig.base.height.inches = 7,
                      insertSize.plot.xlim,
                      sequencing.type = c("RNA","Exome","Genome"),
                      nvc.mark.points = TRUE,
                      maxColumns,
                      maxRows,
                      plotList,
                      labelPlots = TRUE,
                      plot = TRUE,
                      ...)
                      
  makeMultiPlot.colorByGroup(res,
                      outfile, 
                      outfile.dir = "./",
                      outfile.prefix = "plot-colorByGroup", 
                      outfile.ext, 
                      plotter.params = list(), 
                      plot.device.name = "curr", 
                      plotting.device.params = list(),
                      verbose = TRUE, 
                      debugMode, 
                      rasterize.large.plots, 
                      rasterize.medium.plots,
                      raster.height = 1050, 
                      raster.width = 1050,
                      separatePlots = FALSE,
                      exclude.autosomes.chrom.rate.plot = TRUE,
                      chromosome.name.style = "UCSC",
                      fig.res = 150, fig.base.height.inches = 7,
                      insertSize.plot.xlim,
                      sequencing.type = c("RNA","Exome","Genome"),
                      nvc.mark.points = TRUE,
                      maxColumns,
                      maxRows,
                      plotList,
                      labelPlots = TRUE,
                      plot = TRUE,
                      ...)
                      
  makeMultiPlot.colorByLane(res,
                      outfile, 
                      outfile.dir = "./",
                      outfile.prefix = "plot-colorByLane", 
                      outfile.ext, 
                      plotter.params = list(), 
                      plot.device.name = "curr", 
                      plotting.device.params = list(),
                      verbose = TRUE, 
                      debugMode, 
                      rasterize.large.plots, 
                      rasterize.medium.plots,
                      raster.height = 1050, 
                      raster.width = 1050,
                      separatePlots = FALSE,
                      exclude.autosomes.chrom.rate.plot = TRUE,
                      chromosome.name.style = "UCSC",
                      fig.res = 150, fig.base.height.inches = 7,
                      insertSize.plot.xlim,
                      sequencing.type = c("RNA","Exome","Genome"),
                      nvc.mark.points = TRUE,
                      maxColumns,
                      maxRows,
                      plotList,
                      labelPlots = TRUE,
                      plot = TRUE,
                      ...)               

  makeMultiPlot.colorBySample(res,
                      outfile, 
                      outfile.dir = "./",
                      outfile.prefix = "plot-colorByLane", 
                      outfile.ext, 
                      plotter.params = list(), 
                      plot.device.name = "curr", 
                      plotting.device.params = list(),
                      verbose = TRUE, 
                      debugMode, 
                      rasterize.large.plots, 
                      rasterize.medium.plots,
                      raster.height = 1050, 
                      raster.width = 1050,
                      separatePlots = FALSE,
                      exclude.autosomes.chrom.rate.plot = TRUE,
                      chromosome.name.style = "UCSC",
                      fig.res = 150, fig.base.height.inches = 7,
                      insertSize.plot.xlim,
                      sequencing.type = c("RNA","Exome","Genome"),
                      nvc.mark.points = TRUE,
                      maxColumns,
                      maxRows,
                      plotList,
                      labelPlots = TRUE,
                      plot = TRUE,
                      ...)

  makeMultiPlot.highlightSample(res, curr.sample,
                      outfile, 
                      outfile.dir = "./",
                      outfile.prefix = paste0("plot-sampleHL-",curr.sample), 
                      outfile.ext, 
                      plotter.params = list(), 
                      plot.device.name = "curr", 
                      plotting.device.params = list(),
                      verbose = TRUE, 
                      debugMode, 
                      rasterize.large.plots, 
                      rasterize.medium.plots,
                      raster.height = 1050, 
                      raster.width = 1050,
                      separatePlots = FALSE,
                      exclude.autosomes.chrom.rate.plot = TRUE,
                      chromosome.name.style = "UCSC",
                      fig.res = 150, fig.base.height.inches = 7,
                      insertSize.plot.xlim,
                      sequencing.type = c("RNA","Exome","Genome"),
                      nvc.mark.points = TRUE,
                      maxColumns,
                      maxRows,
                      plotList,
                      labelPlots = TRUE,
                      plot = TRUE,
                      ...) 

  makeMultiPlot.highlightSample.colorByLane(res, curr.sample,
                      outfile, 
                      outfile.dir = "./",
                      outfile.prefix = paste0("plot-sampleHL-coloredByLane-",curr.sample), 
                      outfile.ext, 
                      plotter.params = list(), 
                      plot.device.name = "curr", 
                      plotting.device.params = list(),
                      verbose = TRUE, 
                      debugMode, 
                      rasterize.large.plots, 
                      rasterize.medium.plots,
                      raster.height = 1050, 
                      raster.width = 1050,
                      separatePlots = FALSE,
                      exclude.autosomes.chrom.rate.plot = TRUE,
                      chromosome.name.style = "UCSC",
                      fig.res = 150, fig.base.height.inches = 7,
                      insertSize.plot.xlim,
                      sequencing.type = c("RNA","Exome","Genome"),
                      nvc.mark.points = TRUE,
                      maxColumns,
                      maxRows,
                      plotList,
                      labelPlots = TRUE,
                      plot = TRUE,
                      ...)  

  makeMultiPlot.withPlotter(plotter, 
                      res = plotter$res, 
                      outfile,  
                      outfile.dir = "./",
                      outfile.prefix = "plot-custom", 
                      outfile.ext, 
                      plotter.params = list(), 
                      plot.device.name = "curr", 
                      plotting.device.params = list(),
                      verbose = TRUE, 
                      debugMode, 
                      rasterize.large.plots, 
                      rasterize.medium.plots,
                      raster.height = 1050, 
                      raster.width = 1050,
                      separatePlots = FALSE,
                      exclude.autosomes.chrom.rate.plot = TRUE,
                      chromosome.name.style = "UCSC",
                      fig.res = 150, fig.base.height.inches = 7,
                      insertSize.plot.xlim,
                      sequencing.type = c("RNA","Exome","Genome"),
                      nvc.mark.points = TRUE,
                      maxColumns,
                      maxRows,
                      plotList,
                      labelPlots = TRUE,
                      plot = TRUE,
                      ...)

Arguments

res

A QoRT_QC_Results object, created by read.qc.results.data.

plotter

A QoRT_Plotter reference object. See build.plotter.

curr.sample

A character string. For the sample highlight summary plots, this should be the sample.ID of the sample that is to be highlighted.

outfile

The output file can be specified in two ways: first, by setting the outfile parameter, which should be the full path for the output file. Alternatively, the file path will be the concatenation of the three parameters: outfile.dir, outfile.prefix, and outfile.ext.

If plot.device.name == "curr", then all the outfile parameters will be nonfunctional.

outfile.dir

A prefix to be appended to the output filename. Usually the path to the destination directory. By default, this will be the current working directory.

outfile.prefix

A second prefix to be appended to the output filename, after outfile.dir. This is usually the name of the file, without the file extension. By default, a reasonable file name will be selected.

outfile.ext

The file extension. By default, this will be set to match the selected graphics device.

plotter.params

Additional parameters (advanced) used in creation of the Plotter objects. See build.plotter.

plot.device.name

The method to use to save plots. Several formats and devices are supported:

  • "curr" (default) Do not create output files. Plot directly to the current or default device.

  • "png" for standard png compression.

  • "CairoPNG" for png compression using package Cairo. Note that this requires the package Cairo.

  • "tiff" for the tiff device.

  • "jpeg" for the jpeg device (not recommended!)

  • "svg" for the vector svg device. Note that for all vector devices, by default, certain large plots will be rasterized if the png package is found. If not, the function will still work, but output files may be very large and may have trouble rendering and printing.

  • "pdf" for a multi-page pdf report.

  • "CairoPDF" for a multi-page pdf report using package Cairo. Note that this requires the package Cairo.

plotting.device.params

A named list of parameters to be passed to the graphics device. For example:

  • width = 2000

  • height = 2000

  • units = "px"

Reasonable values for height, width, and pointsize will be chosen by default. Generally all raster plots will be set to 1000 by 1000 pixels, and all vector plots will be set to 7 inches by 7 inches.

verbose

Logical. If TRUE, more information will be printed to the console.

debugMode

Logical. If TRUE, debugging data will be printed to the console.

rasterize.large.plots

Logical. If TRUE, then if the currently selected plotting device is a vector device (or the "curr" device), then certain large plots will have their plotting areas rasterized. The axis labels, titles, and text will all remain vectorized, only the plotting areas will be flattened. Note that this requires the png package.

By default, this parameter will be set to TRUE when a vector device is selected.

rasterize.medium.plots

Logical. as rasterize.large.plots, but applies to moderately-large plots. By default, this parameter will be set to TRUE for pdf/CairoPDF output only.

raster.height

Numeric. If rasterize.plotting.area is TRUE, then this is the height of the plotting area raster image, in pixels.

raster.width

Numeric. If rasterize.plotting.area is TRUE, then this is the width of the plotting area raster image, in pixels. Double-pane plots will be twice this width.

separatePlots

Logical. If TRUE, then separate image files will be saved for each individual plot, rather than saving one large multi-pane plot. Note that this is not compatible with the "curr" device. Also note: if this parameter is set to TRUE, then the output files will be saved using the outfile.dir, outfile.prefix and outfile.ext parameters. The "outfile" parameter cannot be set. The files will be saved to the contatenation of outfile.dir, outfile.prefix, the name of the plot type, and then outfile.ext.

exclude.autosomes.chrom.rate.plot

A logical value indicating whether to exclude autosomes from the plot. See makePlot.chrom.type.rates

chromosome.name.style

A string value indicating the style of the chromosome names, and also how to split up the categories. See makePlot.chrom.type.rates

fig.res

Numeric value. The number of pixels per "inch" (for raster devices only). For some plotting devices the figure height will be in pixels not inches, and will equal this value multiplied by the fig.base.height.inches value.

fig.base.height.inches

Numeric value. The base height, in inches, of each sub-figure in the plot. This will be equal to the height for vector devices, or used to calculate the height in pixels using the fig.res value (see above).

insertSize.plot.xlim

A numeric vector of length 2. The x-axis limits for the insert size plot. By default QoRTs will attempt to find reasonable values for this, but there are always situations where the default behavior is not ideal. Using this parameter you can set it explicitly.

nvc.mark.points

Logical. If TRUE, then points should be marked with shapes on the NVC plots.

sequencing.type

The type of sequencing data being analyzed. This only changes the default plot set, which can be overriden with the plotList parameter.

maxColumns

If set, QoRTs will attempt to create a multiplot that has (at most) maxColumns columns. Extra rows will be added to fit all the plots, as needed.

maxRows

If set, QoRTs will attempt to create a multiplot that has (at most) maxRows rows. Extra columns will be added to fit all the plots as needed. To set the number of rows and columns manually, you can set both maxColumns and maxRows.

plotList

The list of desired plots.

labelPlots

Logical. If TRUE, then label each plot with a letter.

plot

Logical. If FALSE, do not create any plots. (In other words, do nothing but test the ability to create plots).

...

Arguments to be passed to methods, such as graphical parameters (see par).

Details

Produces large, multi-frame summary plots, with a large number of different plots and graphs.

For devices pdf and CairoPDF, this function will produce a multi-page document suitable for printing, with (by default) 6 panels on each page.

Note that for all vector devices (svg, pdf, and CairoPDF), by default, QoRTs will attempt to load the png package. If this package is found, then certain large plots (the NVC plots and the cumulative diversity plots) will be rasterized within the plotting area. The labels and text will still be vectorized. If the png package is not installed, the function will still work, but output files may be very large and may have trouble rendering and printing.

Rasteration of large plots can be turned off via the rasterize.large.plots option.

See Also

build.plotter

Examples

  ## Not run: 
##D     data(res,package="QoRTsExampleData");
##D     makeMultiPlot.colorByGroup(res);
##D   
## End(Not run)

[Package QoRTs version 1.3.6 Index]