plot_links: plot_links

Description Usage Arguments Details Value Examples

View source: R/zelda.R

Description

Takes an edge list (from a bipartite network) And plots a railway bipartite plot using ggplot2

Usage

1
plot_links(edgelist, return_ggplot = FALSE)

Arguments

edgelist

The edgelist corresponding to the bipartite network

return_ggplot

Flag to return a ggplot2 object instead of plotting

Details

The link list can be regarded as a bipartite network. Only the first two columns of the edgelist are used

Value

Returns a ggplot2 object, either plotting directly or as a list.

Examples

1
2
3
4
5
6
7
 receptor_candidates <- c("CD3", "AIF", "CCR3", "CXCR3")
 ligand_candidates <- c("TP53", "NFKB1", "CXCL9")
 links <-
 return_links(receptor_candidates, ligand_candidates, "all")
 head(links)

 plot_links(links)

lubianat/zelda documentation built on Dec. 5, 2019, 3:26 a.m.