plotSeqQuals-methods: Plot the Per Sequence Quality Scores

Description Usage Arguments Details Value Examples

Description

Plot the Per Sequence Quality Scores 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
plotSeqQuals(
  x,
  usePlotly = FALSE,
  labels,
  pwfCols,
  counts = FALSE,
  alpha = 0.1,
  warn = 30,
  fail = 20,
  ...
)

## S4 method for signature 'ANY'
plotSeqQuals(
  x,
  usePlotly = FALSE,
  labels,
  pwfCols,
  counts = FALSE,
  alpha = 0.1,
  warn = 30,
  fail = 20,
  ...
)

## S4 method for signature 'character'
plotSeqQuals(
  x,
  usePlotly = FALSE,
  labels,
  pwfCols,
  counts = FALSE,
  alpha = 0.1,
  warn = 30,
  fail = 20,
  ...
)

## S4 method for signature 'FastqcData'
plotSeqQuals(
  x,
  usePlotly = FALSE,
  labels,
  pwfCols,
  counts = FALSE,
  alpha = 0.1,
  warn = 30,
  fail = 20,
  ...
)

## S4 method for signature 'FastqcDataList'
plotSeqQuals(
  x,
  usePlotly = FALSE,
  labels,
  pwfCols,
  counts = FALSE,
  alpha = 0.1,
  warn = 30,
  fail = 20,
  plotType = c("heatmap", "line"),
  dendrogram = FALSE,
  cluster = FALSE,
  ...
)

Arguments

x

Can be a FastqcData, FastqcDataList or path

usePlotly

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

labels

An optional named factor 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 containing the colours for PASS/WARN/FAIL

counts

logical. Plot the counts from each file if counts = TRUE, otherwise the frequencies will be plotted

alpha

set alpha for line graph bounds

warn, fail

The default values for warn and fail are 5 and 10 respectively (i.e. percentages)

...

Used to pass various potting parameters to theme. Can also be used to set size and colour for box outlines.

plotType

character. Can only take the values plotType = "heatmap" or plotType = "line"

dendrogram

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

cluster

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

Details

Plots the distribution of average sequence quality scores across the set of files. Values can be plotted either as counts (counts = TRUE) or as frequencies (counts = FALSE).

Any faceting or scale adjustment can be performed after generation of the initial plot, using the standard methods of ggplot2 as desired.

Value

A standard ggplot2 object, or an interactive plotly object

Examples

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

# Also subset the reads to just the R1 files
r1 <- grepl("R1", fqName(fdl))
plotSeqQuals(fdl[r1])

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