|
From: | Gábor Csárdi |
Subject: | Re: [igraph] Ouput of igraph functions |
Date: | Fri, 4 Mar 2011 09:47:22 -0500 |
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
___________________________________________________________________
Alex Upton, BEng, MRes, PG Cert Business Administration
PhD Researcher Biomedical Informatics, Signals and Systems
School of Electronic, Electrical and Computer Engineering,
College of Engineering and Physical Sciences, University of Birmingham
Edgbaston, Birmingham, B15 2TT, United Kingdom
Fax: +44 121 4144291 (school general office)
Email: address@hidden<mailto:address@hidden>
Personal Web: http://postgrad.eee.bham.ac.uk/uptona/
__________________________________________________________________
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |