plotSeqContent-methods: Plot the per base content as a heatmap

Description Usage Arguments Details Value Examples

Description

Plot the Per Base content for a set of FASTQC files.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
plotSeqContent(x, usePlotly = FALSE, labels, ...)

## S4 method for signature 'ANY'
plotSeqContent(x, usePlotly = FALSE, labels, ...)

## S4 method for signature 'character'
plotSeqContent(x, usePlotly = FALSE, labels, ...)

## S4 method for signature 'FastqcData'
plotSeqContent(x, usePlotly = FALSE, labels, ...)

## S4 method for signature 'FastqcDataList'
plotSeqContent(
  x,
  usePlotly = FALSE,
  labels,
  pwfCols,
  plotType = c("heatmap", "line", "residuals"),
  cluster = FALSE,
  dendrogram = FALSE,
  ...,
  nc = 2
)

Arguments

x

Can be a FastqcData, FastqcDataList or file paths

usePlotly

logical. Generate an interactive plot using plotly

labels

An optional named vector of labels for the file names. All file names must be present in the names of the vector. File extensions are dropped by default.

...

Used to pass additional attributes to theme() and between methods

pwfCols

Object of class PwfCols to give colours for pass, warning, and fail values in plot

plotType

character. Type of plot to generate. Must be "line", "heatmap" or "residuals"

cluster

logical default FALSE. If set to TRUE, fastqc data will be clustered using hierarchical clustering

dendrogram

logical redundant if cluster is FALSE if both cluster and dendrogram are specified as TRUE then the dendrogram will be displayed.

nc

Specify the number of columns if plotting a FastqcDataList as line plots. Passed to ggplot2::facet_wrap.

Details

Per base sequence content ( heatmap colours when plotting from multiple reports. The individual line plots are able to be generated by setting plotType = "line", and the layout is determined by facet_wrap from ggplot2.

Individual line plots are also generated when plotting from a single FastqcData object.

If setting usePlotly = TRUE for a large number of reports, the plot can be slow to render. An alternative may be to produce a plot of residuals for each base, produced by taking the position-specific mean for each base.

Value

A ggplot2 object or an interactive plotly object

Examples

1
2
3
4
5
6
7
8
9
# Get the files included with the package
packageDir <- system.file("extdata", package = "ngsReports")
fl <- list.files(packageDir, pattern = "fastqc.zip", full.names = TRUE)

# Load the FASTQC data as a FastqcDataList object
fdl <- FastqcDataList(fl)

# The default plot
plotSeqContent(fdl)

ngsReports documentation built on Nov. 23, 2020, 2:01 a.m.