[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Help combining vertices with the same ID into one new vertex an
From: |
Alex Upton |
Subject: |
[igraph] Help combining vertices with the same ID into one new vertex and removing multiple edges resulting from this |
Date: |
Wed, 19 Sep 2012 03:27:43 +0100 |
Good evening,
I am having some trouble with something. I have a dataset, which contains probe
IDs and gene symbols. After creating a weighted igraph with the probe IDs as
the vertex names, I then map them to the gene symbols.
This is the code for what I have done:
V(gone)$gene_ID =as.character(annot$Sym[match(V(gone)$name,annot$probeset_id)])
# map the probe IDs to gene symbols
V(gone)$gene_ID # returns the list of gene symbols, with multiples vertices
having the same gene symbol, i.e. not all unique entries
The issue is that for some gene symbols, multiples probes map to just one gene
symbol. Therefore, what I would like to do is use V(gone)$gene_ID to create a
new graph with only unique vertex values for this attribute. This would result
in fewer vertices. Then, if possible, I would like to remove the mutliple edges
that would exist as a result of this, and keep just the highest weighted edge
between two vertices, instead of the multiple ones that may now exist. Any help
with this would be greatly appreciated as I have tried different approaches so
far, and none of them have worked.
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
Personal Web: http://postgrad.eee.bham.ac.uk/uptona/
--------------------------------------------------------------------------------------------
- [igraph] Help combining vertices with the same ID into one new vertex and removing multiple edges resulting from this,
Alex Upton <=