Hi Brent,
the problem is that you are querying specifically with the union_seq  
that you constructed afresh in this script, which did not come from  
pygr.Data.  That's why it works when you use the msa constructed  
afresh from union_seq, but not when you use the msa from pygr.Data.   
The thing that obscured this was that the printing of the proper error  
message was screwed up by our recent seqdb_review.  I fixed this in  
the latest master branch in the public repository.

The simple fix is to change is to change your line:

for item, edge in msa[union_seq['sorghum.10'][1:40400]].items():

to

for item, edge in msa[msa.seqDict['sorghum.10'][1:40400]].items():

In the case where msa was loaded from pygr.Data, msa.seqDict will be  
the object loaded from pygr.Data.  In the case where msa was  
constructed afresh from union_seq etc., msa.seqDict will be union_seq  
(just as you assigned it).

Does this make sense to you, or do you think that users will find this  
confusing?

FYI, pygr.Data (and pygr in general) does not attempt to analyze  
whether different objects (created on different occasions potentially  
by different users) are actually the same underlying data.  You might  
think that because you opened "the same file" on two occasions it  
should consider those two different objects to be equivalent.  Of  
course, all sorts of things might have changed in between different  
file open operations, so the only reliable way to test equivalence  
would be to compute a md5 hash or equivalent on the complete data  
represented by that object.  We've avoided such potentially  
performance-killing approaches in favor of the KISS approach of  
pygr.Data: if the user saved the object as name X, within a single  
interpreter session every request for name X is guaranteed to get the  
same object (unless you specifically turn off this behavior by using  
pygr.Data.clear_cache() to force future requests to reload...).

Again, does this make sense to you, or do you think users will find  
this confusing?

Thanks for reporting and analyzing this problem!!!

-- 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-dev@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to