plotDistanceIgraph: Plotting a Distance Network

View source: R/plot_functions.R

plotDistanceIgraphR Documentation

Plotting a Distance Network

Description

plotDistanceIgraph will create a graph-like visualisation (ripple plot) of the corresponding barcode sequences and their similarity based on the igraph package. The nodes represent the barcode sequences and their respective size reflects the corresponding read counts. Edges between nodes indicate a distance between two barcodes of maximal minD. If ori_BCs is provided the node color also refelects the distance of a particular barcode to one of the initial barcodes.

Usage

plotDistanceIgraph(
  BC_dat,
  minDist = 1,
  loga = TRUE,
  ori_BCs = NULL,
  threeD = FALSE,
  complete = FALSE,
  col_type = "rainbow",
  leg_pos = "left",
  inset = -0.125,
  title = "Distance",
  m = "hamming"
)

Arguments

BC_dat

a BCdat object.

minDist

an integer value representing the maximal distance value for which the graph will contain edges.

loga

a logical value, indicating the use or non-use of logarithmic read count values.

ori_BCs

a vector of character strings containing the barcode sequences (without the fixed positions of the barcode construct).

threeD

a logical value to chose between 2D and 3D visualisation.

complete

a logical value. If TRUE, every node will have at least one edge.

col_type

a character sting, choosing one of the available color palettes.

leg_pos

a character string, containing the position of the legend (e.g. topleft), if NULL no legend will be plotted

inset

a numeric value, specifying the distance from the margins as a fraction of the plot region

title

a character string, containing the legend title

m

a character string, Method for distance calculation, default value is Hamming distance. Possible values are "osa", "lv", "dl", "hamming", "lcs", "qgram", "cosine", "jaccard", "jw", "soundex" (see stringdist function of the stringdist-package for more information).

Value

an igraph object.


genBaRcode documentation built on March 31, 2023, 11:02 p.m.