Thanks for the tips!

- Changed strand to orientation in my Gene class, as you pointed out
- Saved AnnotationDB to worldbase as well

Once genes_db was saved to worldbase, I did not have any problems
loading the NLMSA object. And also didn't run into any pickling
problems for my Gene and other classes.

rochak

On Jul 16, 1:00 pm, Christopher Lee <[email protected]> wrote:
> Hi,
> a few initial comments:
> - your Gene class is used solely as the "slice info" for  
> *constructing* an annotation object, so leave the  
> AnnotationDB.itemClass as the default (AnnotationSeq).
>
> - Since you're not using Gene to create interesting object-oriented  
> behaviors, I suggest you just use a tuple, which eliminates any  
> possible problems with pickling your Gene class.  You can do that as  
> follows:
> genes_db = seqdb.AnnotationDB(genes, sorghum, annotationType='Gene:',  
> sliceAttrDict=dict(id=0, start=1, stop=2, orientation=3))
>
> The sliceAttrDict tells AnnotationDB the order of the required slice  
> info attributes in each tuple.
>
> Then add your gene info as tuples to the genes dictionary, like so:
> genes[name] = (seqID, start, stop, strand)
>
> - first make sure that you can retrieve gene annotations successfully  
> from gene_db, then make sure you can query genes_map successfully with  
> sequence regions to find the appropriate gene annotations, then  
> *finally* try saving this in worldbase.  It is much easier to debug  
> one thing at a time, before adding the extra complications of  
> unpickling / worldbase.  For example, it doesn't look like your Gene  
> code would work as written, because AnnotationDB expects the  
> orientation attribute to be called "orientation" but Gene saves it as  
> "strand"...
>
> - you saved the NLMSA to worldbase, but apparently didn't save the  
> AnnotationDB to worldbase.  You should save that to worldbase too.
>
> Hope this helps...
>
> -- Chris Lee
--~--~---------~--~----~------------~-------~--~----~
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