VisBOL / visbol-js

SBOLv rendering in JavaScript
visbol.org
BSD 2-Clause "Simplified" License
10 stars 3 forks source link

getDisplayListJson provide a Json with information about the sbol com… #126

Closed linediconsine closed 2 years ago

linediconsine commented 2 years ago

This is my proposal for #124. It provides in JSON format information that before was only in the tooltip string

Let me know any feedback

Example of output:

{
    "version": 1,
    "components": [
        {
            "segments": [
                {
                    "name": "BBa_C0510",
                    "segmentId": "https:\/\/synbiohub.org\/public\/igem\/BBa_C0510\/1",
                    "sequence": [
                        {
                            "strand": "positive",
                            "type": "promoter",
                            "id": "https:\/\/synbiohub.org\/public\/igem\/BBa_C0510\/annotation1830299\/1",
                            "name": "lacI+pL",
                            "uri": "https:\/\/synbiohub.org\/public\/igem\/BBa_R0011\/1",
                            "propriety": {
                                "Component": {
                                    "Identifier": "BBa_R0011",
                                    "Name": "lacI+pL",
                                    "Description": "Promoter (lacI regulated, lambda pL hybrid)"
                                },
                                "Feature": {
                                    "SO": "SO:0000167",
                                    "Role": "promoter",
                                    "iGEM Part Type": "Regulatory",
                                    "Orientation": "inline"
                                }
                            },
                            "isComposite": false
                        },
                        {
                            "strand": "positive",
                            "type": "terminator",
                            "id": "https:\/\/synbiohub.org\/public\/igem\/BBa_C0510\/annotation1830308\/1",
                            "name": "BBa_C0440",
                            "uri": "https:\/\/synbiohub.org\/public\/igem\/BBa_C0440\/1",
                            "propriety": {
                                "Component": {
                                    "Identifier": "BBa_C0440",
                                    "Name": "BBa_C0440",
                                    "Description": "Terminator (bgl)"
                                },
                                "Feature": {
                                    "SO": "SO:0000141",
                                    "Role": "terminator",
                                    "iGEM Part Type": "Terminator",
                                    "Orientation": "inline"
                                }
                            },
                            "isComposite": false
                        },

Thanks

linediconsine commented 2 years ago

@benjhatch here my proposal for #124.

Let me know any feedback

Thanks

benjhatch commented 2 years ago

Hi @linediconsine

I will have a look at it tomorrow morning, if everything seems to be working I will go ahead and merge :)

Thanks!

linediconsine commented 2 years ago

Hi @benjhatch Let me know any feedback on this

Thanks

benjhatch commented 2 years ago

Hi Marco,

My apologies for taking so long. It looks good! It also seems to be completely separate from basically all the other code, so any existing applications that depend on the original getDisplayList should be fine. I will go ahead and merge this PR.

Thanks!