removing duplicate edges

1,048 views
Skip to first unread message

Dariel

unread,
Nov 16, 2008, 1:18:57 PM11/16/08
to cytoscape-helpdesk
Hi, I'm working on a network I created by importing interaction data
from two sources that have some overlapping data. I have a common edge
attribute that would allow me to identify duplicate entries. I was
wondering if there is any function or plugin to remove the duplicate
entries in Cytoscape.

Thanks,

Dariel

Andrés Flórez

unread,
Nov 16, 2008, 8:10:17 PM11/16/08
to cytoscape...@googlegroups.com
Hi Dariel,

Try using the plugin Network Analyzer, and the option remove duplicate edges,

hope this helps
--
Andrés F. Flórez

Associate Researcher
Program for the Study and Control
of Tropical Diseases (PECET).
Universidad de Antioquia.
Medellín-Colombia.
Carrera 53 # 61 - 30, SIU, Lab 632
www.pecet-colombia.org
Phones: +57-4-219 6507 / 02
Fax: +57-4-219 6511
Cell phone: 3103462268
e-mail: andres...@pecet-colombia.org

Dariel Ashton-Beaucage

unread,
Nov 16, 2008, 10:31:27 PM11/16/08
to cytoscape...@googlegroups.com
Thanks for your help. I tried the remove duplicate edges function in network analyzer. What this does though is limit the edges between 2 nodes to a maximum of 3. Any excess edges are removed randomly. 
What I'd like to do though is to remove edges that are true duplicates. Any idea how this can be done?

Dariel 
_____________________________
Dariel Ashton-Beaucage
IRIC - Université de Montréal
(514) 343-6111 ext.8092
d.ashton...@umontreal.ca

Carlo Laudanna

unread,
Nov 17, 2008, 2:36:56 AM11/17/08
to cytoscape...@googlegroups.com, Laudanna Carlo, d.ashton...@umontreal.ca
Hi Dariel.

A solution is to save your network as .sif file.

Then, you open your file in BBEdit (http://www.barebones.com/).

In the Text menu you will find the option  "Process duplicate lines ..."

There you have some options to remove duplicate lines, that is network edges, in the file.

For instance, if in the file there are A pp B and B pp A BBEdit will remove the second one.

Of course this makes sense if your network is undirected.

Hope it helps,

best

Carlo



Carlo Laudanna, PhD, MD
Associate Professor of Pathology
University of Verona
Department of Pathology
Division of General Pathology
Strada le Grazie 8, 37134
Verona - Italy
phone: 045-8027689
mobile: 349-1237138
fax: 045-8027127


Carlo Laudanna

unread,
Nov 17, 2008, 2:55:08 AM11/17/08
to cytoscape...@googlegroups.com, Carlo Laudanna
Sorry!

I have to retract my previous suggestion!

Indeed, BBEdit removes duplicates lines, not edges.

However, an other solution is to open the file with the older version 2.3.2 of Cytoscape .

By doing that, duplicate edges are removed. It was a bug, I think, but useful!

Actually, it would be nice to it back as option. Indeed, if one wants to calculate topological properties of a network, based for instance on shortest path or on degree, duplicate edges will be a problem. If the network is undirected

Carlo


On Nov 17, 2008, at 4:31 AM, Dariel Ashton-Beaucage wrote:

Dariel Ashton-Beaucage

unread,
Nov 17, 2008, 1:05:23 PM11/17/08
to cytoscape...@googlegroups.com
Thanks, that works fine - I was able to remove duplicates using excel 2007.


Dariel
_____________________________
Dariel Ashton-Beaucage
IRIC - Université de Montréal
(514) 343-6111 ext.8092
d.ashton...@umontreal.ca


Andrés Flórez

unread,
Nov 17, 2008, 8:14:41 PM11/17/08
to cytoscape...@googlegroups.com
Could you please post your solution in a little bit more detail?

thanks

Dariel Ashton-Beaucage

unread,
Nov 17, 2008, 11:48:02 PM11/17/08
to cytoscape...@googlegroups.com
Sure, I opened the sif file in Excel and used the filters to manually sort out duplicates. Not much of a solution, but II have a 200 node network so it wasn't too long to do...
Actually, the problem I have comes from using the Advanced Network Merge function. Another workaround was to remove edge information originating from a particular data source in one of the 2 original networks used in the merge.

_____________________________
Dariel Ashton-Beaucage
IRIC - Université de Montréal
(514) 343-6111 ext.8092
d.ashton...@umontreal.ca


iris kreft

unread,
Dec 1, 2021, 6:44:46 PM12/1/21
to cytoscape-helpdesk
Hi,

you can use R to remove duplicated values
cor_matrix_melt = cor_matrix_melt[!duplicated(cor_matrix_melt$value),]

Op dinsdag 18 november 2008 om 05:48:02 UTC+1 schreef Dariel Ashton-Beaucage:
Reply all
Reply to author
Forward
0 new messages