Skip to content

Discussion for Group feature in COBRApy #954

@Hemant27031999

Description

@Hemant27031999

Hi all, @draeger, @matthiaskoenig, @Midnighter, @cdiener, and other members of COBRApy. I am opening a new thread for discussing about the implementation of Group package in COBRApy as I could not find one best suited for this discussion.

Complete support for Group package has already been added in COBRApy to parse the group info to cobra models. Even if the information is present in the form of subsystems inside the notes of a reaction, that is also extracted and converted to the group structure of cobra models. However, the group information is currently not put in JSON format if cobra models are converted to JSON form, and hence this information is lost. One of the tasks of the project #137 is to add complete support of Group feature in SBML-JSON form. I went through the Group specification document to understand the group structure and here is the format I propose for it:

{
    '+++',
    "listOfGroups" : {
        "metaid": "value",
        "sboterm": "value",
        "notes": "value",
        "annotation": {"content"},
        "groups": [
            {
                "id": "value",
                "name": "value",
                "notes": "value",
                "annotation": {"content"},
                "kind": "value",
                "listOfMembers": {
                    "metaid": "value",
                    "sboterm": "value",
                    "notes": "value",
                    "annotation": {"content"},
                    "members": [
                        {
                            "id": "value",
                            "name": "value",
                            "notes": "value",
                            "annotation": {"content"},
                            "idRef": "value",
                            "metaIdRef": "value"
                        },
                        '...'
                    ]
                }
            },
            '...'
        ],
    },
    '+++'
}

Some key-value pairs shown above are optional and may not be present like those which came due to extension from SBase class and are of type optional. Also, only one out of idRef and metaIdRef attribute is to be used inside the Member class. All these things will be handled inside the method that will do the parsing.

One thing I want to point here is that all the classes under group package i.e., ListOfGroups, Group, ListOfMembers, and Member extends the SBase class and hence can possibly have the attributes of SBase class also like notes and annotations. However, in the current implementation of COBRApy, only the notes and annotations corresponding to Group class are parsed to the cobra model. No parsing of notes and annotations corresponding to ListOfGroup, ListOfMembers, and Member class is done. So theoretically speaking, I think the parsing of notes and annotations of these classes should also be implemented. The above JSON format support this, but this information first has to be parsed to cobra models. Members, can you please provide your review regarding this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions