plotDistanceVisNetwork: Plotting a Distance Network

View source: R/plot_functions.R

plotDistanceVisNetworkR Documentation

Plotting a Distance Network

Description

plotDistanceVisNetwork will create a graph-like visualisation (ripple plot) of the corresponding barcode sequences and their similarity based on the ggplot2 and the ggnetwork packages. 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 minDist. If ori_BCs is provided the node color also refelects the distance of a particular barcode to one of the given barcodes.

Usage

plotDistanceVisNetwork(
  BC_dat,
  minDist = 1,
  loga = TRUE,
  ori_BCs = NULL,
  complete = FALSE,
  col_type = "rainbow",
  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).

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.

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

a visNetwork object.


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