plotDupLevels {ngsReports} | R Documentation |
Plot the Sequence_Duplication_Levels information for a set of FASTQC reports
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), ... )
x |
Can be a |
usePlotly |
|
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 |
... |
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 |
|
dendrogram |
|
heatCol |
Colour palette used for the heatmap |
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.
A standard ggplot2 or plotly object
# 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)