Closed samseaver closed 11 months ago
I was testing in ModelSEEDPy and so by implementing these changes it seems to work with model.medium=<media object>
but it's not fully tested...
The example code snippet you gave works just fine for me. Also tested on another model and medium assignment works:
import cobrakbase
kbase = cobrakbase.KBaseAPI()
model = kbase.get_from_ws('GCF_000005845.2.RAST.mdl', 151186)
media = kbase.get_from_ws('Carbon-D-Glucose', 151186)
model.medium = media
The corrected type for KBase media should be cobrakbase.core.kbasebiochem.media.Media
I have old types when I wasn't following the KBase datatype "path"
Oh, I think you are using the wrong branch... https://github.com/Fxe/cobrakbase/tree/cobra-model ! this is the corrected branch, sorry for the confusion. Will fix this mess since it is not obvious for other folks.
I was using the cobra-model
branch, but I see you've updated it so I'll do a pull and test
This simple script wouldn't work for me:
I figured out somehow that the Media object in
cobrakbase/core/kbasebiochem/media.py
is not passing the object_type field, while the one incobrakbase/core/kbasebiochemmedia.py
does, and if I use the latter, it doesn't fail, but I'm unsure if this is the right object to use for ModelSEEDPy