|
From: Harsha R. <ran...@gm...> - 2017-02-21 19:53:28
|
Thank you Brett,
For helping me out with xmlns syntax it works and for clarifying
*groups: listofGroups.*
I am able to do a round trip with read and write sbml files with groups.
Regards
On Tue, Feb 21, 2017 at 6:59 PM, Brett G. Olivier <b.g...@vu...> wrote:
> Hi Harsha
>
> I'm not sure it's the best way, but I would do it is as follows:
>
> xmlns = SBMLNamespaces(3, 1)
> xmlns.addNamespace("http://www.w3.org/1999/xhtml"
> <http://www.w3.org/1999/xhtml>, "xhtml")
> xmlns.addNamespace("http://www.myproject.com" <http://www.myproject.com>,
> "myproject")
> xmlns.addNamespace("http://www.sbml.org/sbml/level3/
> version1/groups/version1"
> <http://www.sbml.org/sbml/level3/version1/groups/version1>, "groups")
>
> sbmlDoc = SBMLDocument(xmlns)
> model = sbmlDoc.createModel()
>
> As far as *groups: listofGroups* goes, this is as it should be. All
> package elements use a qualified namespace that differentiates them from
> SBML core.
> HTH
> Brett
>
>
> On 21/02/2017 13:38, Harsha Rani wrote:
>
> Can someone help me to write and read sbml file with groups in python
> along with
> annotation which is specific to project.
> I am attaching file in which I tried to add groups, I am unable to do, I
> am sure I am missing some syntax.
>
> sbmlns = SBMLNamespaces(3,1,"groups",1);
> sbmlDoc = SBMLDocument(sbmlns)
>
> mplugin = model.getPlugin("groups");
> group = mplugin.createGroup();
> group.setId("ATPS");
> group.setKind("classification");
>
> I get this
> <groups:listOfGroups>
> <groups:group groups:id="ATPS" groups:kind="classification">
> <groups:listOfMembers>
> <groups:member groups:idRef="ATPc"/>
> <groups:member groups:idRef="ATPm"/>
> </groups:listOfMembers>
> </groups:group>
> </groups:listOfGroups>
>
> why *groups: listofGroups *I was expecting
>
> *listOfGroups *
> I also have xmlns namespace as I need to add annotation specific to project
>
>
> Thank you
>
>
> --
> Brett G. Olivier PhD
> Systems Bioinformatics
> Vrije Universiteit Amsterdam
> Tel: +31 20 5987248 <+31%2020%20598%207248>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> sbml-groups mailing list
> sbm...@li...
> https://lists.sourceforge.net/lists/listinfo/sbml-groups
>
>
|