温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

R语言中怎么用network.r绘制网络图

发布时间:2022-03-21 14:37:43 来源:亿速云 阅读:626 作者:iii 栏目:开发技术

本篇内容主要讲解“R语言中怎么用network.r绘制网络图”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“R语言中怎么用network.r绘制网络图”吧!

network.r绘制网络图,边权重信息决定网络中边的粗细,节点的度决定节点大小,根据节点类别填充节点颜色;提取网络的最大子图,输出构成最大子图的节点并绘制子图网络。

使用方法:

Rscript network.r -h
usage: 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/1531

optional 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]

参数说明:

-e   网络图的边信息文件路径,文件中包含边的起始节点,结尾节点,以及边的权重信息

from
to
combined_score
fromGeneName
toGeneName
9606.ENSP00000011653
9606.ENSP00000046794
959
CD4
LCP2
9606.ENSP00000061240
9606.ENSP00000204604
952
TLL1
CHRD
9606.ENSP00000172229
9606.ENSP00000228945
945
NGFR
ARHGDIB

-v   网络中节点信息文件路径,文件中包含节点(节点名与边信息文件中起始节点名,结尾节点名相对应)和节点类别信息

gene
regulate
CD4
Up
TLL1
Up
ARHGDIB
Up

-f   边信息文件中起始节点列名

-t   边信息文件中结尾节点列名

-w  边信息文件中边权重列名

-g   节点信息文件中节点类别列名

-i   网络图中是否隐藏孤立节点,默认不隐藏

-L  是否标注完整网络的节点名,默认标注

-S  是否标注最大子图中节点名,默认标注

到此,相信大家对“R语言中怎么用network.r绘制网络图”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI