metaplot_mismatches: MetaPlots mismatches using ggplot2.

View source: R/helpers_plots.R

metaplot_mismatchesR Documentation

MetaPlots mismatches using ggplot2.

Description

Plots mismatches 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. Zero position on new coordinates is the most left UPPER case letter of the respective amplicon. This function filters out all alignment events that have amplicons without UPPER case defined. Top plot is for the forward reads and bottom plot is for reverse reads.

Usage

metaplot_mismatches(alnmt, config, group, selection)

Arguments

alnmt

(data.frame) Loaded alignment information from alignments_events.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.

Value

(mismatches metaplot) ggplot2 object of mismatches metaplot

See Also

Other specialized plots: metaplot_deletions(), metaplot_insertions(), 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_mismatches(alignments,
                    config, "Group", "Betty")


valenlab/amplican documentation built on Jan. 28, 2024, 5:10 a.m.