plot_deletions: Plots deletions using ggplot2.

Description Usage Arguments Value See Also Examples

View source: R/helpers_plots.R

Description

This function plots deletions in relation to the amplicon, assumes events are relative to the expected cut site. Top plot is for the forward reads, middle one shows amplicon sequence, and bottom plot is for reverse reads.

Usage

1
2
plot_deletions(alignments, config, id, cut_buffer = 5,
  xlab_spacing = 4, over = "overlaps")

Arguments

alignments

(data.frame) Loaded alignment information from alignments.csv file.

config

(data.frame) Loaded table from config_summary.csv file.

id

(string or vector of strings) Name of the ID column from config file or name of multiple IDs if it is possible to group them. First amplicon will be used as the basis for plot.

cut_buffer

(numeric) Default is 5, you should specify the same as used in the analysis.

xlab_spacing

(numeric) Spacing of the x axis labels. Default is 4.

over

(string) Specify which columns contains overlaps with expected cut sites generated by amplicanOverlap

Value

(deletions plot) gtable object of deletions plot

See Also

Other specialized plots: metaplot_deletions, metaplot_insertions, metaplot_mismatches, plot_cuts, plot_heterogeneity, plot_insertions, plot_mismatches, plot_variants

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#example config
config <- read.csv(system.file("extdata", "results", "config_summary.csv",
                               package = "amplican"))
#example alignments results
alignments_file <- system.file("extdata", "results", "alignments",
                               "events_filtered_shifted_normalized.csv",
                               package = "amplican")
alignments <- read.csv(alignments_file)
p <- plot_deletions(alignments[alignments$consensus, ],
                    config, c('ID_1','ID_3'))

amplican documentation built on Nov. 8, 2020, 11:10 p.m.