Dear Bill,
Merry Christmas and Happy New Year to you as well!
I am transferring this conversation to the more specific jsbml-development group. We should continue this discussion there as needed and remove sbml-discuss from the list of recipients from further communication. If you aren't on it yet, please subscribe to this list at
https://groups.google.com/d/forum/jsbml-development.
Now, to answer your question: You are already doing everything correctly. What you get are the gene-protein-reaction association objects. However, the output via System.out follows the standard Java convention. It displays the SBML object's name (such as "or" or "geneProductRef") followed by all the attributes that are directly set on this particular object in square brackets, e.g., fbc:geneProduct="G_YOR100C".
I assume you prefer to print the SBML code instead. For this, you'll need to pass the object to an SBMLWriter. As I see it, you can't easily serialize a part of an SBML object to SBML code using JSBML with existing tools.
There are two options:
1) You could create an SBML String of the entire SBML document and then use String manipulation to get the part you need.
2) Another option would be to write the parts you are interested in yourself by accessing fields and producing a String in SBML format.
Maybe, if we know more about what you strive to achieve, we might find another solution or a workaround.
Cheers
Andreas
> Am 26.12.2021 um 18:23 schrieb Bill Yang <
billy...@gmail.com>:
>
> Merry Christmas and Happy New Year!
>
> I am trying to extract the logical expressions from GeneProductAssociation of fbc reactions. And thankfully I am almost there with the FBCReactionPlugin:
> <Screen Shot 2021-12-26 at 5.09.12 PM.png>
> But I got something like these, which is the first line of the <fbc:geneProductAssociation>:
> <Screen Shot 2021-12-26 at 5.13.48 PM.png>
>
> Example files:
> <Screen Shot 2021-12-26 at 5.19.18 PM.png>
> <Screen Shot 2021-12-26 at 5.19.55 PM.png>
>
> Please could you guide me through mining the geneProductAssociation correctly?
>
> Thanks a lot!
>
> Bill
With best regards
Dr. Andreas Draeger
Assistant Professor
---
University of Tübingen
Institute for Bioinformatics and Medical Informatics (IBMI)
Computational Systems Biology of Infections and Antimicrobial-Resistant Pathogens
Sand 14 · Office #C108 · 72076 Tübingen · Germany
Phone:
+49-7071-29-70459 · Fax:
+49-7071-29-5152
Web:
http://systems-biology.info · Twitter: @dr_drae
YouTube:
https://www.youtube.com/c/systemsbiology