[pygr-notify] Issue 54 in pygr: sqlgraph.GraphView unpickle-able error
codesite-noreply at google.com
codesite-noreply at google.com
Wed Apr 22 00:09:08 PDT 2009
Comment #7 on issue 54 by jennyhappeha: sqlgraph.GraphView unpickle-able
error
http://code.google.com/p/pygr/issues/detail?id=54
Hi Chris,
After adding *OneToOneRelation* to two lines in Data.py as you suggested:
line1
from metabase import ResourceServer, dumps, OneToManyRelation, \
ManyToManyRelation, PygrDataNotPortableError, PygrDataNotFoundError, \
PygrDataMismatchError, PygrDataEmptyError, PygrDataReadOnlyError, \
PygrDataSchemaError, PygrDataNoModuleError, ResourceZone
line2
the __all__ list at the bottom of Data.py
I am able to save a GraphView object to pygr.Data successfully using the
modified
issue54.py.
Saved GraphView can be accessed via pygr.Data and used as a mapper to
retrieve target
objects, given a particular source object.
qing at 1[ensembl]$ python -i
Python 2.5.2 (r252:60911, Nov 14 2008, 19:46:32)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pygr import sqlgraph
>>> from ensembl import adaptor
>>> import pygr.Data
>>> pygr.Data.dir('Bio.Annotation.Ensembl')
['Bio.Annotation.Ensembl.homo_sapiens_core_47_36i.exonTB',
'Bio.Annotation.Ensembl.homo_sapiens_core_47_36i.translationTB']
>>> translationTB =
pygr.Data.getResource('Bio.Annotation.Ensembl.homo_sapiens_core_47_36i.translationTB')
>>> translation = translationTB[15121]
>>> pygr.Data.dir('Bio.Ensembl')
['Bio.Ensembl.GraphView.homo_sapiens_core_47_36i.translationExons']
>>> translationExons =
pygr.Data.getResource('Bio.Ensembl.GraphView.homo_sapiens_core_47_36i.translationExons')
>>> exons = translationExons[translation]
>>> for e in exons:
... print e.id
...
95160
95020
95035
95050
95059
95069
95081
95088
95101
95110
95172
Cheers,
Jenny
Attachments:
issue54.py 1.8 KB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the pygr-notify
mailing list