phsc.plot.maxedge.network: Plot probability network with most likely edges

View source: R/phyloscan.fun.plotting.R

phsc.plot.maxedge.networkR Documentation

Plot probability network with most likely edges

Description

This function plots the network showing the most likely edge types.

Usage

phsc.plot.maxedge.network(
  df,
  di,
  point.size = 10,
  point.size.couple = point.size * 1.4,
  edge.gap = 0.04,
  edge.size = 0.4,
  curvature = -0.2,
  arrow = arrow(length = unit(0.04, "npc"), type = "open"),
  curv.shift = 0.08,
  label.size = 3,
  node.label = "ID",
  node.shape = NA_character_,
  node.fill = NA_character_,
  node.shape.values = NA_integer_,
  node.fill.values = NA_character_,
  edge.label = NA_character_,
  edge.label.values = NA_character_,
  threshold.linked = NA_real_
)

Arguments

df

data.table with the following columns 'IDCLU','ID1', 'ID2', 'TYPE','KEFF','LKL_MAX','POSTERIOR_SCORE'

di

data.table with meta-data to customize the plot with columns ID, node.shape, node.label, node.fill

point.size

size of the individual points

edge.gap

value to adjust start / end points of edges

edge.size

multiplier by which the size of edges is shrunk/magnified

curvature

curvature of directed edges

arrow

type of arrow to be plotted

curv.shift

offset to place the label for directed edges

label.size

size of label

node.label

Text displayed on top of each node

node.shape

column name in di by which the shape of each node is drawn

node.fill

column name in di by which each node is coloured

node.shape.values

named vector associating shapes to the values in the node.shape column

node.fill.values

named vector associating colours to the values in the node.fill column

threshold.linked

treshold value between 0 and 1. Edges with weight above this treshold are shown in black.

point.sizec.couple

size of the outer ring around individuals in couples

Value

ggplot object


olli0601/phyloscan documentation built on April 25, 2024, 4:16 a.m.