Hi
with the Perl binding of libSBML 5.18.0/fbc on Linux, I try to get the fbc:geneProductAssociation of reactions.
Unfortunately it does not look to work.
my $fbcReaction = $reaction->getPlugin('fbc'); $fbcReaction->isSetGeneProductAssociation(); # returns true $fbcReaction->getGeneProductAssociation(); #returns "$VAR1 = bless( {}, 'LibSBML::GeneProductAssociation' );" with Data::Dumper $fbcReaction->getGeneProductAssociation()->isSetAssociation(); # returns true $fbcReaction->getGeneProductAssociation()->getAssociation(); # returns NOTHING
Maybe I do something wrong, but it looks weird.
The same code in Java works.
Thank you for reporting this. We will try to look at this problem as soon as we can.
Other methods to get fbc values work
I've tried for some time to make it work, but i really just don't understand why it is not. So the best i can offer is a workaround, that extends the geneProductAssociation by methods that oroduce the infix, or get the specific element.
If this does work for you, i'll be happy to commit that. I'll attach an example, as well as a the updated
local-fbc.i
, that you will have to place intosrc/bindings/perl
before compilation, so the example will work for you.Currently I found another temporary way to get the geneProductAssociation with
$fbcReaction->getGeneProductAssociation()->toXMLNode()->getChild(0)->toXMLString();
Then I parse the XML
it might be easier to just call
getGeneProductAssociation()->toSBML()
that will give you the element as xml string.Right, easier