Hi!
gPath_ind = [ eg2id[e] for e in egPath ] gPath_filt = g.new_vertex_property("bool") gPath_filt.a[:] = False gPath_filt.a[gPath_ind] = True gp = GraphView(g, vfilt=gPath_filt) gpl = GraphView(gp, vfilt=label_largest_component(gp)) path_lc = [ int(v) for v in gpl.vertices() ]
fails for some reason I don't see.
I guess the problem is a small quirk with label_largest_component(). The code above removes all but one vertex, which has index gPath_ind, from the graph (is this really what you want, BTW?). The function
gPath_ind is a list of indices of vertices I wanna keep in the filtered view of the graph, i.e. definitely more than one vertex. From that set of vertices I want to extract the largest component.
The vertex index is preserved by filtering. So you could do something like:
v = g.vertex(int(u))
where u belongs to the filtered graph, and g is the unfiltered graph.
That is what I assumed, but good to have that confirmed. Thanks
BTW, the newest graph-tool seems to compile and install just fine on MacOS. At least it brings its own DLFCN.py and hence installing out of the box.
What do you mean? I haven't included DLFCN.py anywhere... (I can't anyway, since it is platform-dependent code)
Hmm, I thought I deleted it manually, but obviously not. Anyway, if one puts the DLFCN.py into the graph-tool directory, it runs fine here. So I guess we should file a bug to macports regarding the python installation (in the meantime I reinstalled Xcode and python such that I have a proper macports installation of python 2.7). CU, Sebastian
Cheers, Tiago
-- Tiago de Paula Peixoto <tiago@skewed.de>
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
-- Sebastian Weber Group of Cell Communication and Control Freiburg Institute for Advanced Studies - FRIAS School of Life Sciences - LIFENET Albert-Ludwigs-Universität Freiburg Albertstr. 19 79104 Freiburg T.: +49-761-203-97237 Fax:+49-761-203-97334