> I am working on a protein-protein interaction network using python-igraph > and I want get the largest component in it and get the protein list (by > their names) in the largest component. But after I call the ".clusters()", I > am not sure what to do next. .clusters() gives you a VertexClustering object:
https://pythonhosted.org/python-igraph/igraph.clustering.VertexClustering-class.html You can call its .giant() method to get the largest component and then you can simply retrieve the vertex names from there: cl = g.clusters() largest_component = g.giant() print largest_component.vs[“name”] (This assumes that the protein names are stored in a vertex attribute named “name”) Best, T. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
