% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers_plots.R
\name{metaplot_deletions}
\alias{metaplot_deletions}
\title{MetaPlots deletions using ggplot2 and ggbio.}
\usage{
metaplot_deletions(alnmt, config, group, selection, over = "overlaps")
}
\arguments{
\item{alnmt}{(data.frame) Loaded alignment information from
events_filtered_shifted_normalized.csv file.}

\item{config}{(data.frame) Loaded table from config_summary.csv file.}

\item{group}{(string) Name of the column from the config file to use for
grouping. Events are subselected based on this column and values from
selection.}

\item{selection}{(string or vector of strings) Values from config column
specified in group argument.}

\item{over}{(string) Specify which column contains overlaps with
expected cut sites generated by \code{\link{amplicanOverlap}}}
}
\value{
(deletions metaplot) ggplot2 object of deletions metaplot
}
\description{
This function plots deletions in relation to the amplicons for given
\code{selection} vector that groups values by given config \code{group}.
All reads should
already be converted to their relative position to their respective amplicon
using \code{\link{amplicanMap}}.
Top plot is for the forward reads and bottom plot is for reverse reads.
}
\examples{
#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)
metaplot_deletions(alignments[alignments$consensus, ],
                   config, "Group", "Betty")

}
\seealso{
Other specialized plots: \code{\link{metaplot_insertions}},
  \code{\link{metaplot_mismatches}},
  \code{\link{plot_cuts}}, \code{\link{plot_deletions}},
  \code{\link{plot_heterogeneity}},
  \code{\link{plot_insertions}},
  \code{\link{plot_mismatches}},
  \code{\link{plot_variants}}
}
