igraph中的微生物网络分析 [英] Microbial Network Analysis in igraph

查看:71
本文介绍了igraph中的微生物网络分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有所有分类级别的细菌 OTU 表.我想使用 igraph(或任何其他包)绘制网络.我从来没有创建过这样的情节,所以如果有人知道初学者的一些教程链接吗?或如果有人用脚本指导我,您的时间将不胜感激.谢谢!

I have bacterial OTU table at all taxonomy levels. I want to plot network using igraph (or any other package). I have never created such plot so please if anyone know some tutorial link for beginner? OR If someone guide me with scripts, you time would be really appreciated. Thank you!

推荐答案

  1. 网络分析中的关系数据集至少由一个描述链接并包含至少 2 个列的 data.frame(或矩阵)组成,以便在 2data.frame 的第一列.此边缘列表"的其他列指示这些链接中的每一个的特征.此后,让我们调用这个 data.frame edgeslist
  2. 您可能不需要第二个数据集,以指示节点的特征,又名节点列表".这些是第二个 data.frame(或矩阵),第一个列表示节点名称,其他列表示每个节点的特征.Igraph 中的节点列表必须指示每个单个节点.每个节点必须在节点列表中只出现一次,并且不允许在节点列表中缺少边列表(from"或to"列)中的任何一个节点.此后,让我们调用这个 data.frame nodeslist.

  1. A relationship dataset in network analysis is made of, at least, one data.frame (or matrix) which describe the links and contains at least 2 cols, in order to indicate 'from' and 'to' link on the 2 first cols of the data.frame. Others col's of this 'edges list' indicates the caracteristics of each of theselinks. Hereafter, lets call this data.frame edgeslist
  2. You maybe wan't a second dataset, in order to indicate caracteristics for your nodes, aka 'nodes-list'. These are a second data.frame (or matrix) with first col indicate the nodes-names, and others cols indicate caracteristics of each nodes. The nodes-list in Igraph have to indicate each of the single nodes. Each node had to appear only once in the nodes-list, and not a single of the nodes that are in the edgeslist ('from' or 'to' columns) is allowed to be missing in the nodes-list. Hereafter, lets call this data.frame nodeslist.

  1. 然后,您必须使用 igraph::graph_from_data_frame(edgeslist,directed = F, vertices = nodeslist)

并且您可以访问此对象以编译一堆全局统计信息或获取与某些节点关联的一些新数据(例如,cliques <- igraph::largest_cliques(mygraph)igraph::edge_density(mygraph, loops=T) )

And you can access to this object for compile a bunch of global statistics or obtain some new-data associated with some nodes (e.g., cliques <- igraph::largest_cliques(mygraph) or igraph::edge_density(mygraph, loops=T) )

尝试查找一些现有教程,例如这个.

Try to find some of the existing tutorials like this one.

这篇关于igraph中的微生物网络分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆