Indeed, I get back what you expect from the first test: In [4]: G[G.sourceDB[1]] Out[4]: <pygr.sqlgraph.SQLEdgeDict object at 0x5bd6490>
In [5]: G[G.sourceDB[1]].items() Out[5]: [(annot17186[0:2677], <pygr.classutil.TupleO_M01152_refGene object at 0x67ec3d0>)] The second I get back integers, not objects: In [6]: for a in G: ...: print a ...: break ...: ...: 1 I'm looking into upgrading, but Paul added some class for added functionality to database connections that I'll have to get him to re- do - otherwise our connections are broken. Kenny On Feb 22, 12:31 pm, Christopher Lee <l...@chem.ucla.edu> wrote: > Hi Kenny, > this more or less fits what I said last time but doesn't shed much new light. > Out of curiosity, what happens if you take an Annotation object a1 from > resource1 and use it as a key to your SQLGraph, e.g. something like this: > > a1 = resource1['key you know is in the mapping'] > for a2, e in graph[a1].items(): > print a2, e > > They should be pairs of Annotation objects from resource2, and row objects > from edges. > > I'd also like to see what you get when you iterate over your SQLGraph, e.g. > > for a in graph: > print a > break # quit after 1st value > > Its iteration values should be Annotation objects from resource1. > > I just want to be sure that your SQLGraph is working by itself, before > considering the interaction with graph query. > > A few points: > > - are you really still working with 0.8.0-beta1? That was just a beta. > We've fixed a lot of bugs since then. I strongly advise you to get the > latest release. > > - at the point where it crashed, it expected an (Annotation) object but > instead got a long. That is suggestive -- long is the data type that MySQLdb > uses to return integer values, so this presumably came from SQLGraph. > > -- Chris -- You received this message because you are subscribed to the Google Groups "pygr-dev" group. To post to this group, send email to pygr-...@googlegroups.com. To unsubscribe from this group, send email to pygr-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pygr-dev?hl=en.