makePlot.chrom.type.rates {QoRTs}R Documentation

Chromosome type rate plot

Description

Plots the number or percent of read-pairs falling on each type of chromosome.

Usage

makePlot.chrom.type.rates(plotter, 
                      plot.rates = TRUE,
                      chromosome.name.style = "UCSC",
                      exclude.autosomes = FALSE,
                      chrom.norm.factors = NULL,
                      custom.chromosome.style.def.function = NULL,
                      return.table = FALSE, 
                      debugMode, singleEndMode,
                      plot = TRUE,
                      ...)

Arguments

plotter

A QoRT_Plotter reference object. See build.plotter.

plot.rates

A logical value indicating whether to plot percent of the total (for each bam file), rather than read-counts.

chromosome.name.style

A string value indicating the style of the chromosome names, and also how to split up the categories. There are 4 legal options:

  • "UCSC": The default. Chromosomes are named: "chr1,chr2,...,chrX,chrY,chrXY,chrM". There are 6 categories: autosome, X, Y, XY, mitochondrial, and other.

  • "ENSEMBL": Chromosomes are named: "1,2,...,X,Y,XY,MT". There are 6 categories: autosome, X, Y, XY, mitochondrial, and other.

  • "UCSC_WITH_ERCC": As UCSC, but there is an additional category, which contains all chromosomes that begin with the text "ERCC".

  • "ENSEMBL_WITH_ERCC": As ENSEMBL, but there is an additional category, which contains all chromosomes that begin with the text "ERCC".

chrom.norm.factors

(Advanced users)

exclude.autosomes

A logical value indicating whether to exclude autosomes from the plot.

custom.chromosome.style.def.function

(For advanced users) If your chromosomes do not match any of the above styles, then you can set your own chromosome style by handing this option a function. The function must take one argument. When handed NULL, it must return a list of all legal categories. When handed a single chromosome name, it must return one of those categories.

return.table

A Logical value. If TRUE, the function will return a table containing the plotted data.

debugMode

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

singleEndMode

Logical. Determines whether the dataset consists of single-ended reads. By default this is determined from the data. Thus, this parameter should never need to be set by the user.

plot

Logical. If FALSE, suppress plotting and return TRUE if and only if the data is present in the dataset to allow plotting. Useful to automatically filter out missing data plots.

...

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

Details

For each sample-run, this function plots the number of read-pairs mapping to each category of chromosome.

Value

By default, this function returns nothing. If the return.table parameter is TRUE, then it returns a data.frame with the data that was plotted.

See Also

build.plotter

Examples

  data(res,package="QoRTsExampleData");
  plotter <- build.plotter.colorByGroup(res);
  makePlot.chrom.type.rates(plotter);
## Starting: Chromosome Rates plot.
## Finished: Chromosome Rates plot.[time: 2018-09-25 13:12:11],[elapsed: 0.2 secs]

plot of chunk unnamed-chunk-1


[Package QoRTs version 1.3.6 Index]