On Jul 24, 2009, at 10:42 AM, Kenny Daily wrote:

>
> I guess what I mean then is how are the edges assigned in the graph?
> When you do something like:
>
>>>> G[exon1][exon2] = some_edge
>
> what is 'some_edge'? Is it an index? Is it an object created from the
> database?

Ordinarily, just like exon1 and exon2, it is an object from a  
database, in this case from edgeDB.  Alternatively, in the  
modification that you and I were discussing, it became simply an int,  
that would be stored directly.

>
> How does the Graph object know that there is an edge between exon1 and
> exon2, just by creating Graph(sourceDB=exonDB, targetDB=exonDB,
> edgeDB=spliceDB)?

Instantiating a Graph object creates an *empty* graph, to which you  
then add nodes via

graph += node

and add edges via

graph[node1][node2] = edge

When you instantiate the Graph object, you are just telling it your  
*schema* ("I want to create a graph that maps source nodes from  
sourceDB to target nodes from targetDB, with edge information from  
edgeDB").

-- Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to