plot_network: Plot a gene network

View source: R/plot_network.R

plot_networkR Documentation

Plot a gene network

Description

Plots a gene regulatory network with a semi-circular layout. Good for plotting on top of genome scans. Interaction weights are mapped to edge transparency.

Usage

plot_network(arch, trait, xaxis = "location")

Arguments

arch

A tbl_graph containing the genetic architecture (the output of read_architecture passed through tidyrgraph::as_tbl_graph)

trait

Name of the trait for which to show the network (as it appears in arch)

xaxis

What to show on the x-axis. Either of "location" for genomic location (continuous between 0 and 1) or "locus" for locus index.

Value

A ggraph

Note

Somehow the ggraph library needs to be loaded for this function to produce the expected output (use library(ggraph)).

See Also

read_architecture, tidygraph::as_tbl_graph

Examples


root <- system.file("extdata", "sim-example", package = "speciomer")
arch <- read_architecture(root)
arch <- tidygraph::as_tbl_graph(arch)
plot_network(arch, trait = 1)


rscherrer/speciomer documentation built on March 11, 2023, 5:37 p.m.