plotSeqLengthDistn | R Documentation |
Plot the Sequence Length Distribution across one or more FASTQC reports
plotSeqLengthDistn(
x,
usePlotly = FALSE,
labels,
pattern = ".(fast|fq|bam).*",
...
)
## S4 method for signature 'ANY'
plotSeqLengthDistn(
x,
usePlotly = FALSE,
labels,
pattern = ".(fast|fq|bam).*",
...
)
## S4 method for signature 'character'
plotSeqLengthDistn(
x,
usePlotly = FALSE,
labels,
pattern = ".(fast|fq|bam).*",
...
)
## S4 method for signature 'FastqcData'
plotSeqLengthDistn(
x,
usePlotly = FALSE,
labels,
pattern = ".(fast|fq|bam).*",
counts = TRUE,
plotType = c("line", "cdf"),
expand.x = c(0, 0.2, 0, 0.2),
plotlyLegend = FALSE,
colour = "red",
...
)
## S4 method for signature 'FastqcDataList'
plotSeqLengthDistn(
x,
usePlotly = FALSE,
labels,
pattern = ".(fast|fq|bam).*",
counts = FALSE,
plotType = c("heatmap", "line", "cdf"),
cluster = FALSE,
dendrogram = FALSE,
heat_w = 8,
pwfCols,
showPwf = TRUE,
scaleFill = NULL,
scaleColour = NULL,
heatCol = hcl.colors(50, "inferno"),
plotlyLegend = FALSE,
...
)
x |
Can be a |
usePlotly |
|
labels |
An optional named vector of labels for the file names. All filenames must be present in the names. |
pattern |
Regex to remove from the end of any filenames |
... |
Used to pass additional attributes to theme() |
counts |
|
plotType |
|
expand.x |
Output from |
plotlyLegend |
logical(1) Show legend for interactive line plots |
colour |
Line colour |
cluster |
|
dendrogram |
|
heat_w |
Relative width of any heatmap plot components |
pwfCols |
Object of class |
showPwf |
logical(1) Show PASS/WARN/FAIL status |
scaleFill , scaleColour |
Optional ggplot scale objects |
heatCol |
The colour scheme for the heatmap |
This extracts the Sequence Length Distribution from the supplied object and generates a ggplot2 object, with a set of minimal defaults. The output of this function can be further modified using the standard ggplot2 methods.
A cdf plot can also be generated to provide guidance for minimum
read length in some NGS workflows, by setting plotType = "cdf"
.
If all libraries have reads of identical lengths, these plots may be less
informative.
An alternative interactive plot is available by setting the argument
usePlotly = TRUE
.
A standard ggplot2 object, or an interactive 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)
# Plot as a frequency plot using lines
plotSeqLengthDistn(fdl)
# Or plot the cdf
plotSeqLengthDistn(fdl, plotType = "cdf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.