plotDupLevels-methods: Plot the combined Sequence_Duplication_Levels information

Description Usage Arguments Details Value Examples

Description

Plot the Sequence_Duplication_Levels information for a set of FASTQC reports

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
plotDupLevels(x, usePlotly = FALSE, labels, pwfCols, ...)

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

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

## S4 method for signature 'FastqcData'
plotDupLevels(
  x,
  usePlotly = FALSE,
  labels,
  pwfCols,
  warn = 20,
  fail = 50,
  lineCols = c("red", "blue"),
  ...
)

## S4 method for signature 'FastqcDataList'
plotDupLevels(
  x,
  usePlotly = FALSE,
  labels,
  pwfCols,
  warn = 20,
  fail = 50,
  deduplication = c("pre", "post"),
  plotType = c("heatmap", "line"),
  cluster = FALSE,
  dendrogram = FALSE,
  heatCol = inferno(50),
  ...
)

Arguments

x

Can be a FastqcData, FastqcDataList or file path

usePlotly

logical Default FALSE will render using ggplot. If TRUE plot will be rendered with plotly

labels

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

pwfCols

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

...

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

warn, fail

The default values for warn and fail are 20 and 50 respectively (i.e. percentages)

lineCols

Colours of the lines drawn for individual libraries

deduplication

Plot Duplication levels 'pre' or 'post' deduplication. Can only take values "pre" and "post"

plotType

Choose between "heatmap" and "line"

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.

heatCol

Colour palette used for the heatmap

Details

This extracts the Sequence_Duplication_Levels from the supplied object and generates a ggplot2 object, with a set of minimal defaults. For multiple reports, this defaults to a heatmap with block sizes proportional to the percentage of reads belonging to that duplication category.

If setting usePlotly = FALSE, the output of this function can be further modified using standard ggplot2 syntax. If setting usePlotly = TRUE an interactive plotly object will be produced.

Value

A standard ggplot2 or plotly object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

# Draw the default plot for a single file
plotDupLevels(fdl[[1]])

plotDupLevels(fdl)

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