metaplot_deletions {amplican} | R Documentation

## MetaPlots deletions using ggplot2.

### Description

This function plots deletions in relation to the amplicons for given `selection` vector that groups values by given config `group`. All reads should already be converted to their relative position to their respective amplicon using `amplicanMap`. Top plot is for the forward reads and bottom plot is for reverse reads.

### Usage

    metaplot_deletions(alnmt, config, group, selection, over = "overlaps")

### Arguments

`alnmt` | (data.frame) Loaded alignment information from events_filtered_shifted_normalized.csv file.
`config` | (data.frame) Loaded table from config_summary.csv file.
`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.
`selection` | (string or vector of strings) Values from config column specified in group argument.
`over` | (string) Specify which column contains overlaps with expected cut sites generated by `amplicanOverlap`

### Value

(deletions metaplot) ggplot2 object of deletions metaplot

### See Also

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

### 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")

[Package amplican version 1.8.2 Index]