ggplotDistanceGraph_EC: Plotting a Distance Network (error correction)

View source: R/plot_functions.R

ggplotDistanceGraph_ECR Documentation

Plotting a Distance Network (error correction)

Description

ggplotDistanceGraph 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 initial barcodes.

Usage

ggplotDistanceGraph_EC(
  BC_dat,
  BC_dat_EC,
  minDist = 1,
  loga = TRUE,
  equal_node_sizes = TRUE,
  BC_threshold = NULL,
  ori_BCs = NULL,
  lay = "fruchtermanreingold",
  complete = FALSE,
  col_type = "rainbow",
  m = "hamming",
  scale_nodes = 1,
  scale_edges = 1
)

Arguments

BC_dat

a BCdat object.

BC_dat_EC

the error corrected BCdat object (the EC_analysis parameter needs to be set to TRUE).

minDist

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

loga

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

equal_node_sizes

a logical value. If TRUE, every node will have the same size.

BC_threshold

a nnumeric value, limiting the number of barcodes for which their error correction "history" will be colored (if BC_threshold = 5 then the five biggest barcodes will be evaluated)

ori_BCs

a vector of character strings containing barcode sequences (without the fixed positions of the barcode construct). Similar to BC_threshold but allowing for barcode identification via sequence.

lay

a character string, identifying the prefered layout algorithm (see ggnetwork layout option).

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).

scale_nodes

a numeric value, scaling the node size.

scale_edges

a numeric value, scaling the edge size.

Value

a ggplot2 object


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