Hi Alex, 

> 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.
Have a look at the contract.vertices function. Given a graph and a mapping 
vector that specifies which vertices are to be contracted into a single one, 
this will construct a new graph for you where some of the vertices are 
contracted into a single one but the edges are kept. You can also specify how 
the attributes of the old vertices are mapped into the attributes of the new 
vertices. Of course this procedure gives you a lot of multiple and/or loop 
edges, so you should follow it by a call to simplify() where you can specify 
how to collapse multiple edges into single ones and what to do with their 
weights (in your case, take the maximum weight and use that).

Best,
Tamas


_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to