plotEvents: Visualise locations of gene conversion events

View source: R/plotting.R

plotEventsR Documentation

Visualise locations of gene conversion events

Description

This function visualises gene conversion events along the V gene listed in annotation. The start-end ranges are represented as thick lines and the 'broader' definition including the padded 5'/3' sequence stretched are represented as thin lines. Vertical lines indicate boundaries between framework regions and CDR.

Usage

plotEvents(
  annotation,
  repertoire,
  thickness = c(0.8, 0.3),
  show.sequence.names = FALSE,
  highlight.genes = NULL
)

Arguments

annotation

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.

thickness

A numeric vector. Controls the thickness of lines plotted. The first number corresponds to the line representing the region from start to end (ie the narrow definition). The second number corresponds to lines drawn fro the broad definition of events including the padded sequences 5'/3' to the start/end points.

show.sequence.names

Do you want the sequence identifiers to be printed on the vertical axis of the output plot? Recommended to set to FALSE if many sequences are supplied in annotation.

highlight.genes

optional, a character vector consisting of gene names which are to be highlighted with different colours in the output plot.

Value

A ggplot2 object. See description for details. If highlight.genes is not NULL and the given genes can be found in annotation$gene, gene conversion events using these genes will be highlighted in different colours.


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