[MOBY-l] a (fixed?) problem with biomoby python

Mark Fiers mark.fiers at wur.nl
Fri Mar 11 08:00:38 UTC 2005


LS

We've ran into some problems with the latest biomoby python version from 
cvs.

executing this script:
##########################################################################
from bioMoby import *

m = MobyMarshaller()
um = MobyUnmarshaller()
g = BasicGFFSequenceFeature.MobyBasicGFFSequenceFeature(
     id='2',            Reference='SEQa',
     Source='pipeline', Method='something',
     Start=1,           Stop=44,
     Strand='-',        Frame='3',
     Score=33.3,        articleName='Gene',
     Column9_tag_value=[
         Multi_key_value_pair.MobyMulti_key_value_pair(
         articleName="Column9_tag_value",
         Key='mobytstings', Value=['1','2','3'])
     ])

mo = m.dumps(MobyContent({'test' : [g]}))
print mo.replace('<',"\n<")
m2 = um.loads(mo)
print str(m2).replace('<',"\n<")
##########################################################################

returns a biomoby string with all features I entered, but all of these 
are empty. Upon looking at the source code, it appears that the features 
are not parsed out because of a case mismatch. The xml contains, for 
example,:

<moby:Float moby:articleName="Score" >33.3</moby:Float>

but the from_moby function looks for a float with the name "score". If I 
change this in the function, everything works again. I had to change it 
also for the Multi_key_value_pair, but the GenericSequence was working 
ok. Attached are the fixed BasicGFFSequenceFeature and 
Multi_key_value_pair. but there are many more in the ontology which are 
broken.

Or is there a more generic way in which this can be fixed?

Cheers
Mark Fiers




More information about the moby-l mailing list