Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use network.r to draw Network Diagram in R language

Shulou Source: shulou.com Published: 2022-06-01 04:35:14 11月15日 Update

This article mainly explains "how to draw a network diagram with network.r in R language". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to draw a network diagram with network.r in R language.

Network.r draws the network graph, the edge weight information determines the thickness of the edges in the network, the degree of the node determines the node size, fills the node color according to the node category, extracts the largest subgraph of the network, outputs the nodes that constitute the largest subgraph and draws the subgraph network.

Usage: Rscript network.r-husage: network.r [- h]-e filepath-v filepath-f from-t to-w weight-g group [--isolated] [- l style] [--label.node] [--sub_label.node] [- o path] [- n prefix] [- H number] [- W number] network plot: https://www..com/article/1531optional arguments:-h -- help show this help message and exit-e filepath,-- edge filepath input the edge information of network, [required]-v filepath,-- vertex filepath input the vertex information of network, [required]-f from,-- from from the name of the start gene column [required]-t to,-- to to the name of the end gene column [required]-w weight -- combined_score weight the name of the edge weight column [required]-- g group,-- group group input group id in vertex file, can set multi groups [required]-- isolated delete isolated vertex [optional, default: False]-l style,-- layout style set Network display style,c ('star',' circle' 'gem',' dh', 'graphopt',' grid', 'mds',' randomly', 'fr',' kk', 'drl',' lgl'), [default fr]-- label.node show node name [optional, default: TRUE]-- sub_label.node show node name of sub-network [optional Default: TRUE]-o path,-- outdir path output file directory [default cwd]-n prefix,-- name prefix out file name prefix [default demo]-H number,-- height number the height of pic inches [default 12]-W number -- width number the width of pic inches [default 12] parameter description:

The edge information file path of the-e network graph, which contains the start node, the end node and the weight information of the edge.

From

To

Combined_score

FromGeneName

ToGeneName

9606.ENSP00000011653

9606.ENSP00000046794

nine hundred and fifty nine

CD4

LCP2

9606.ENSP00000061240

9606.ENSP00000204604

nine hundred and fifty two

TLL1

CHRD

9606.ENSP00000172229

9606.ENSP00000228945

nine hundred and forty five

NGFR

ARHGDIB

-v Node information file path in the network, which contains node (node name corresponds to start node name and end node name in the edge information file) and node category information

Gene

Regulate

CD4

UpTLL1

UpARHGDIB

Up

-f the starting node column name in the edge information file

-t end node column name in the edge information file

-w edge weight column name in edge information file

-g Node category column name in the node information file

-I whether orphan nodes are hidden in the network diagram. They are not hidden by default.

-L whether to mark the node name of the complete network, the default dimension

-S whether to mark the name of the node in the largest subgraph. Default annotation

At this point, I believe you have a deeper understanding of "how to draw a network diagram with network.r in R language". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Node network information file language maximum weight category start content method path package diagram learning practical deeper usage interest parameter Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information OPPO Reno macOS Linux