plotCoverage: Histograms of gene conversion events

View source: R/plotting.R

plotCoverageR Documentation

Histograms of gene conversion events

Description

This function visualises histograms showing the coverage or starting point of gene conversion events in a given set of annotation generated from batchConvertAnalysis, using definition of events.

Usage

plotCoverage(
  tb,
  repertoire,
  column1 = NULL,
  column2 = NULL,
  type = c("coverage", "start"),
  definition = c("narrow", "broad", "both")
)

Arguments

tb

data.frame, output from batchConvertAnalysis.

repertoire

A named vector of strings storing nucleotide sequences observed from a repertoire. The names attribute of the vector stores the sequence identifiers.

column1

optional, character corresponding to a column name in tb. If supplied, calculation of coverage will be considered separately for every unique value in column1 of the data frame tb so that histograms can be plotted separately.

column2

optional, character corresponding to a column name in tb. If supplied, calculation of coverage will be considered separately for every unique value in column2 of the data frame tb so that histograms can be plotted separately.

type

character, either 'coverage' (i.e. how often is a given DNA position included within gene conversion events?) or 'start' (i.e. how often do gene conversion events start at a given DNA position?).

definition

character. Indicates which definition of gene conversion event boundaries are to be used. Can take the values of any one of 'narrow' (the strict start/end points given by batchConvertAnalysis), 'broad' (the start/end padded with nucleotides 5'/3' to the given start/end) or 'both' (both 'narrow' and 'end' will be considered and two sets of plots will be generated.)

Value

A ggplot2 object showing the histograms, with x-axis showing the DNA position and y-axis showing the percentage of gene conversion events which cover/start at the given position. Framework (FW) or CDR positions are coloured differently. If column1 and/or column2 are provided separate histograms will be plotted for different data partitions specified along the two given columns present in tb, arranged side-by-side.


Fraternalilab/BrepConvert documentation built on Oct. 14, 2022, 5:54 p.m.