Closed GoogleCodeExporter closed 8 years ago
added kwargs pass-through to MapView, which uses the serverInfo argument.
Original comment by cjlee...@gmail.com
on 7 Jan 2009 at 12:45
Original comment by mare...@gmail.com
on 21 Feb 2009 at 2:07
Hi Jenny,
please verify the fix to this bug that you reported, and then change its status
to
Closed. We are now requiring that each fix be verified by someone other than
the
developer who made the fix.
Thanks!
Chris
Original comment by cjlee...@gmail.com
on 5 Mar 2009 at 12:24
'unpicklingMode' Error.
Note: In the attached script issue54.py, when constructing an GraphView
object, I've
passed the 'serverInfo=conn' as a keyword argument to GraphView:
translationExons = sqlgraph.GraphView(translationTB, exonTB, sql_statement,
cursor,
serverInfo=conn)
Did I miss something else?
Thanks,
~ Jenny
->
qing@2[ensembl]$ python issue54.py
95160
95020
95035
95050
95059
95069
95081
95088
95101
95110
95172
->
qing@2[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.
>>> import pygr.Data
>>> pygr.Data.dir('Bio.Ensembl')
['Bio.Ensembl.GraphView.homo_sapiens_core_47_36i.translationExons']
>>> myGraph =
pygr.Data.Bio.Ensembl.GraphView.homo_sapiens_core_47_36i.translationExons()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pygr/Data.py", line 1126, in __call__
File "pygr/Data.py", line 743, in __call__
File "pygr/Data.py", line 495, in __getitem__
File "pygr/Data.py", line 687, in loads
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.5/pickle.py", line 1217, in load_build
setstate(state)
File "pygr/classutil.py", line 148, in standard_setstate
File "/home/qing/workspace2009/pyensembl/pygr/sqlgraph.py", line 1808, in __init__
MapView.__init__(self, sourceDB, targetDB, viewSQL, cursor, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'unpicklingMode'
Original comment by jqian....@gmail.com
on 8 Mar 2009 at 12:56
Attachments:
Hi Jenny,
added another minor fix that should solve this. Please test it from the latest
code
in the public repository. Unfortunately, we don't have a test for this issue
in the
automated test suite. We should add one!
-- Chris
Original comment by cjlee...@gmail.com
on 12 Mar 2009 at 8:29
Original comment by mare...@gmail.com
on 13 Mar 2009 at 1:01
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@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.translati
onTB')
>>> 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.translatio
nExons')
>>> exons = translationExons[translation]
>>> for e in exons:
... print e.id
...
95160
95020
95035
95050
95059
95069
95081
95088
95101
95110
95172
>>>
Cheers,
Jenny
Original comment by jennyhap...@gmail.com
on 22 Apr 2009 at 7:08
Attachments:
OneToOneRelation has been added back to Data.py in the master branch, so please
go
ahead and change the status of this issue to Closed.
Thanks!
Chris
Original comment by cjlee...@gmail.com
on 22 Apr 2009 at 5:21
Original comment by jqian....@gmail.com
on 22 Apr 2009 at 5:52
Original issue reported on code.google.com by
jqian....@gmail.com
on 19 Dec 2008 at 8:14