plot.genominator.goodness.of.fit: Create goodness-of-fit quantile-quantile plot

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/goodnessOfFit.R

Description

S3 method to plot genominator.goodness.of.fit object. Creates a quantile-quantile plot of the observed versus theoretical quantiles of goodness-of-fit statistics based on a chi-squared distribution.

Usage

1
2
3
4
## S3 method for class 'genominator.goodness.of.fit'
plot(x, chisq = FALSE, plotCol = TRUE,
  qqline = FALSE, xlab = "theoretical quantiles",
  ylab = "observed quantiles", main, pch = 16, cex = 0.75, ...)

Arguments

x

An object of class genominator.goodness.of.fit, as returned by regionGoodnessOfFit.

chisq

Logical indicating whether chi-squared statistics should be plotted (as opposed to p-values from a chi-squared distribution).

plotCol

Logical indicating whether points at extreme quantiles should be colored.

qqline

Logical indicating whether a qqline should be added, this is a line through the 25%- and 75%-quantiles.

xlab

X-axis label for plot.

ylab

Y-axis label for plot.

main

Main label for plot.

pch

Plotting character type for plot.

cex

A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. See par.

...

Additional arguments for lower-level functions, namely plot.

Details

This function constructs a quantile-quantile plot comparing the distribution of observed statistics to either the uniform 0,1 distribution or the appropriate chi-squared distribution. This plotting function provides a tool to assess whether replicate lanes, flow cells, sample preparations, etc. fit the model described in regionGoodnessOfFit.

Value

This method is used for its side effect.

Author(s)

James Bullard bullard@berkeley.edu, Kasper Daniel Hansen khansen@jhsph.edu

See Also

See Genominator vignette for more information. See also regionGoodnessOfFit.

Examples

1
2
3
4
ed <- ExpData(system.file(package = "Genominator", "sample.db"),
              tablename = "raw")
data("yeastAnno")
plot(regionGoodnessOfFit(ed, yeastAnno), chisq = TRUE)

Example output

Loading required package: RSQLite
Loading required package: DBI
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: IRanges
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: GenomeGraphs
Loading required package: biomaRt
Loading required package: grid
Warning message:
In result_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries

Genominator documentation built on Oct. 31, 2019, 8:56 a.m.