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?

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)?

Thanks!

On Jul 22, 9:49 pm, Christopher Lee <[email protected]> wrote:
> Hi Kenny,
> it's really a question of what you want to save as edge information.  
> If you just want to save one number, that can be saved trivially in  
> the Graph (via pickling if it gets saved to a shelve file), in the way  
> I outlined in my last email.  If you want the edge information to be  
> something that itself is part of a database, then give the Graph an  
> edgeDB argument in the usual Pygr pattern...
>
> Example: we like to represent alternative splicing as a directed graph  
> whose nodes are exons and whose edges are splices.  Exons are  
> annotations on the genome; splices are objects that give quite a bit  
> of info about that splicing event.  We store the exons in a database  
> (in our case SQLTable).  We also store the splices in a database (also  
> SQLTable).  Then we create the graph as Graph(sourceDB=exonDB,  
> targetDB=exonDB, edgeDB=spliceDB).
>
> But if all you want to store as the edge-info is an int, creating an  
> edgeDB is overkill...
>
> -- 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