|
From: | Alex Upton |
Subject: | [igraph] Ouput of igraph functions |
Date: | Fri, 4 Mar 2011 14:43:19 +0000 |
Good afternoon I am hoping that someone can help me. I have created an igraph graph, and have assigned attributes to the vertices using the following code: V(gone)$gene_ID =as.character(annot$Sym[match(V(gone)$name,annot$probeset_id)]) I have then calculated the degree for this graph using the following code: d <- degree (gone, v=V(gone)) d Using this code gives me an output of the vertex ids with the degree. What I would like to do is get an output with the degree matched to the gene_ID attribute that I have assigned. I have tried the following code: d <- degree (gone, v=V(gone) $gene_ID) However I get the result Error in as.igraph.vs(graph, v) : Invalid vertex names. Therefore, can anyone suggest how I could get the result that I am after, the degree of the gene_IDs directly, rather than having to match them manually using the vertex ids. Any help is greatly appreciated, my email address is address@hidden Kind regards Alex ___________________________________________________________________ |
[Prev in Thread] | Current Thread | [Next in Thread] |