xina_plot_all: xina_plot_all

Description Usage Arguments Value Examples

View source: R/network_plots.R

Description

xina_plot_all is to draw protein-protein interaction network plots of all the clusters

Usage

1
2
3
4
5
6
7
8
xina_plot_all(xina_result, clustering_result, condition = "all",
  centrality_type = NULL, flag_simplify = TRUE, num_breaks = 5,
  layout_specified = "", vertex_label_flag = FALSE,
  vertex.label.color = "black", vertex.color = "", edge.color = NULL,
  vertex.label.dist = 0.6, vertex.label.cex = 0.8,
  edge.arrow.size = 0.4, vertex.size = 10, vertex.shape = "sphere",
  legend_location = "bottom", num_clusters_in_row = 5,
  flag_unknown_only = FALSE, img_size = NULL, img_qual = 300)

Arguments

xina_result

A list containing XINA network analysis results. See xina_analysis

clustering_result

A list containing XINA clustering results. See xina_clustering

condition

Default is 'all', which means use all the proteins to draw graphs. If you specify the experimental condition name used for XINA clustering, xina_plot_all will draw graphs using specific condition's proteins.

centrality_type

'centrality_type' should be one of c('Degree', 'Eigenvector', 'Hub', 'Authority', 'Closeness', 'Betweenness')

Centrality score igraph function
Degree degree
Eigenvector eigen_centrality
Hub hub_score
Authority authority_score
Closeness closeness
Betweenness betweenness
flag_simplify

If it is TRUE (default), XINA will exclude unconnected proteins

num_breaks

'num_breaks' is the number of ranks based on network centrality. Default is 5.

layout_specified

This can change network layout. 'layout_specified' should be one of c('sphere', 'star', 'gem', 'tree', 'circle', 'random', 'nicely'). XINA's layouts are based on igraph's layout. See layout_

Layout igraph layout name
sphere layout_on_sphere
star layout_as_star
gem layout_with_gem
tree layout_as_tree
circle layout_in_circle
random layout_randomly
nicely layout_nicely

Default is 'layout_nicely' of igraph

vertex_label_flag

If vertex_label_flag is TRUE (default), igraph network graphs will be labeled by gene names If vertex_label_flag is FALSE, igraph network graphs will be drawn without labels

vertex.label.color

Color of labels. Default is black

vertex.color

Color of nodes. Default is pink.

edge.color

Color of edges. Default is pink.

vertex.label.dist

Distance between node and label. Default is 0.6

vertex.label.cex

Size of labels Default is 0.8

edge.arrow.size

Size of edges Default is 0.4

vertex.size

Size of nodes Default is 10

vertex.shape

You can choose node shape. Default is 'sphere'. See shapes

legend_location

If centrality_type is chosen, xina_plot_single add the color legend guiding rank of nodes based on the centrality score. Default is 'bottomright', but you can choose one of these 'bottomright', 'bottom', 'bottomleft', 'left', 'topleft', 'top', 'topright', 'right' and 'center'.

num_clusters_in_row

The number of clusters in a row on the XINA network plot. Default is 5.

flag_unknown_only

If this is TRUE, 'xina_plot_all' will plot proteins that do not have any protein-protein interaction in the given database

img_size

Set the image size. For width=1000 and height=1500, it is img_size=c(1000,1500). Default is c(3000,3000)

img_qual

Set the image resolution. Default is 300.

Value

PNG images of PPI network plots of all the clusters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## the following code is to show how it works quickly
## load XINA example data
data(xina_example)

## load the previously processed XINA analysis results
# if you want to learn how to run 'xina_analysis', please see \link[XINA]{xina_analysis}
data(xina_result_example)

# XINA network plots
xina_plot_all(xina_result_example, example_clusters)

# XINA network plots for Control condition
xina_plot_all(xina_result_example, example_clusters, condition='Control')

langholee/XINA documentation built on March 17, 2020, 5:23 p.m.