plot_network: Plots cape results as a circular network

View source: R/plot_network.R

plot_networkR Documentation

Plots cape results as a circular network

Description

This script plots cape results in a circular network. The chromosomes are arranged in a circle. Main effects are shown in concentric circles around the chromosomes, with each trait in its own circle. Main effects can either be colored as negative or positive, or with parental allele colors for multi-parent populations.

Usage

plot_network(
  data_obj,
  marker_pairs = NULL,
  collapsed_net = TRUE,
  trait = NULL,
  trait_labels = NULL,
  color_scheme = c("DO/CC", "other"),
  main_lwd = 4,
  inter_lwd = 3,
  label_cex = 1.5,
  percent_bend = 15,
  chr_gap = 1,
  label_gap = 5,
  positive_col = "brown",
  negative_col = "blue",
  show_alleles = TRUE
)

Arguments

data_obj

a Cape object

marker_pairs

a two-column matrix identifying which marker pairs should be plotted. This is particularly useful if the network is very dense. The default value, NULL, plots all marker pairs.

collapsed_net

A logical value indicating whether to plot all individual SNPs or linkage blocks calculated by linkage_blocks_network.

trait

A character vector indicating which traits to plot. The default NULL value plots all traits.

trait_labels

A character vector indicating the names of the traits in case the names from the data object are not great for plotting.

color_scheme

A character value of either "DO/CC" or other indicating the color scheme of main effects. If "DO/CC" allele effects can be plotted with the DO/CC colors.

main_lwd

A numeric value indicating the line width for the main effect lines

inter_lwd

A numeric value indicating the line width for the interaction lines

label_cex

A numeric value indicating the size of the labels

percent_bend

A numeric value indicating the amount that the arrows for the interaction effects should be bent. A value of 0 will plot straight lines.

chr_gap

A numeric value indicating the size of the gap plotted between chromosomes.

label_gap

A numeric value indicating the size of the gap the chromosomes and their labels.

positive_col

One of c("green", "purple", "red", "orange", "blue", "brown", "yellow", "gray") indicating the color for positive interactions.

negative_col

One of c("green", "purple", "red", "orange", "blue", "brown", "yellow", "gray") indicating the color for negative interactions. show_alleles A logical value indicating whether to color main effects by their allele values (TRUE) or by whether they are positive or negative (FALSE)

show_alleles

boolean, default is TRUE

Details

Interaction effects are shown as arrows linking chromosomal positions. They are colored based on whether they are positive or negative.

Examples

## Not run: 
plot_network(data_obj)

## End(Not run)

cape documentation built on May 20, 2022, 1:06 a.m.