plotInsertSize | R Documentation |
Plot the insert size distribution from one of Fastp reports
plotInsertSize(x, usePlotly = FALSE, labels, pattern = ".(fast|fq|bam).*", ...)
## S4 method for signature 'FastpData'
plotInsertSize(
x,
usePlotly = FALSE,
labels,
pattern = ".(fast|fq|bam).*",
plotType = c("histogram", "cumulative"),
counts = FALSE,
plotTheme = theme_get(),
expand.x = 0.01,
expand.y = c(0, 0.05),
...
)
## S4 method for signature 'FastpDataList'
plotInsertSize(
x,
usePlotly = FALSE,
labels,
pattern = ".(fast|fq|bam).*",
plotType = c("heatmap", "line", "cumulative"),
plotTheme = theme_get(),
scaleFill = NULL,
scaleColour = NULL,
cluster = FALSE,
dendrogram = FALSE,
heat_w = 8,
...
)
x |
A FastpData or FastpDataList object |
usePlotly |
|
labels |
An optional named vector of labels for the file names. All file names must be present in the names of the vector. |
pattern |
Regex to remove from the end of any filenames |
... |
Passed to |
plotType |
Determine the plot type. Options vary with the input structure |
counts |
logical(1) Plot read counts, or percentages (default) |
plotTheme |
a theme object |
expand.x , expand.y |
Axis expansions |
scaleFill |
Continuous scale used to fill heatmap cells. Defaults to the "inferno" palette |
scaleColour |
Discrete scale for adding line colours |
cluster |
|
dendrogram |
|
heat_w |
Width of the heatmap relative to other plot components |
Takes a Fastp os a set of Fastp reports and plot insert size distributions. Plots can be drawn as cumulative totals or the default histograms for a single report, and as boxplots or heatmaps for a set of reports
A ggplot or plotly object
# Get the files included with the package
packageDir <- system.file("extdata", package = "ngsReports")
fl <- list.files(packageDir, pattern = "fastp.json.gz", full.names = TRUE)
fp <- FastpData(fl)
plotInsertSize(
fp, counts = TRUE, fill = "steelblue4",
plotTheme = theme(plot.title = element_text(hjust = 0.5))
)
plotInsertSize(fp, plotType = "cumulative")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.