PMR2 / models.physiomeproject.org

The Physiome Model Repository
0 stars 0 forks source link

Discrepancy between JSON and HTML content types #1

Open bilalshaikh42 opened 2 years ago

bilalshaikh42 commented 2 years ago

Hello,

I am experiencing a strange issue for the following exposure:

https://models.physiomeproject.org/exposure/e340f005288ec6bd49535cf792769dd0

When visiting the URL by browser (HTML) I see the navigation has a link called "Modeling Activation and Desensitisation of G-Protein Coupled Receptors Provides Insight into Ligand Efficacy" that points to a CellML file.

Usually, this is represented in the JSON as a link with the prompt "Modeling Activation and Desensitisation of G-Protein Coupled Receptors Provides Insight into Ligand Efficacy" and a HREF pointing to the view for the particular CellML file.

However, requesting this exposure with a JSON content type gives the following, which is unlike any other response that I have encountered:

{
    "collection": {
        "href": "https://models.physiomeproject.org/exposure/e340f005288ec6bd49535cf792769dd0/document_view",
        "items": [
            {
                "href": "https://models.physiomeproject.org/exposure/e340f005288ec6bd49535cf792769dd0/document_view",
                "data": [
                    {
                        "name": "contents",
                        "value": "\n<div id=\"tmp-documentation\"><h4>Model Status</h4>\n    \n    <p xmlns:mathml=\"http://www.w3.org/1998/Math/MathML\" class=\"tmp-doc-para\">\n            This CellML model has been recoded to remove the reaction element.  The model is known to run in both PCEnv and COR to recreate the published results.  The units have been checked and are consistent.  \n          </p>\n  <h4>Model Structure</h4>\n\n\n<p xmlns:mathml=\"http://www.w3.org/1998/Math/MathML\" class=\"tmp-doc-para\">\nSignalling through G-protein coupled receptors is one of the most common and most important methods of transmitting information to the inside of cells.  Many mathematical models have been published to describe this type of signal transduction, but the kinetic model described by Riccobene, Omann and Linderman (1999) is unique in that it includes the dynamics of G-protein activation and desensitisation, in addition to considering active and inactive receptor states (see the figure below).  The model was used to predict how different ligands would affect the nature of the signal transduction response.\n</p>\n\n<p xmlns:mathml=\"http://www.w3.org/1998/Math/MathML\" class=\"tmp-doc-para\">\nThe complete original paper reference is cited below:\n</p>\n\n<p xmlns:mathml=\"http://www.w3.org/1998/Math/MathML\" class=\"tmp-doc-para\">\n<a href=\"http://www.sciencedirect.com/science?_ob=ArticleURL&amp;_udi=B6WMD-45FS9MH-1M&amp;_coverDate=09%2F21%2F1999&amp;_alid=60512469&amp;_rdoc=1&amp;_fmt=summary&amp;_orig=search&amp;_qd=1&amp;_cdi=6932&amp;_sort=d&amp;_acct=C000011498&amp;_version=1&amp;_urlVersion=0&amp;_userid=140507&amp;md5=eeedd4baf8e60b260f706ae4b2e8fe60\">Modeling Activation and Desensitisation of G-Protein Coupled Receptors Provides Insight into Ligand Efficacy</a>, Todd A. Riccobene, Geneva M. Omann and Jennifer J. Linderman, 1999 <a href=\"http://www.sciencedirect.com/science?_ob=JournalURL&amp;_cdi=6932&amp;_auth=y&amp;_acct=C000011498&amp;_version=1&amp;_urlVersion=0&amp;_userid=140507&amp;md5=c8e64d20ff203cda2255f4b6b7affe4f\">\n            <em class=\"tmp-doc-emphasis\">Journal of Theoretical Biology</em>\n          </a>, 200, 207-222.  (A <a href=\"http://www.sciencedirect.com/science?_ob=MImg&amp;_imagekey=B6WMD-45FS9MH-1M-1&amp;_cdi=6932&amp;_orig=search&amp;_coverDate=09%2F21%2F1999&amp;_qd=1&amp;_sk=997999997&amp;wchp=dGLbVlb-lSzBA&amp;_acct=C000011498&amp;_version=1&amp;_userid=140507&amp;md5=eac152447fa4c1ee1cb9479ee44b8e77&amp;ie=f.pdf\">PDF</a> version of the article is available for Journal Members on the Journal of Theoretical Biology website.)  <a href=\"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=PubMed&amp;list_uids=10504286&amp;dopt=Abstract\">PubMed ID: 10504286</a>\n</p>\n\n<table class=\"tmp-doc-informalfigure\"><tr class=\"tmp-doc-informalfigure\"><td class=\"tmp-doc-informalfigure\"><img class=\"tmp-doc-informalfigure\" alt=\"\" src=\"riccobene_1999.png\" /></td></tr><tr class=\"tmp-doc-informalfigure\"><td class=\"tmp-doc-informalfigure-caption\">A schematic diagram of Riccobene, Omann and Linderman's model of G-protein coupled receptor signalling.  R is the inactive form of the receptor, R* is the active form of the receptor, R<sub xmlns:mathml=\"http://www.w3.org/1998/Math/MathML\">ds</sub> is the desensitised form of the receptor, L represents the ligand (in this case, N-formyl-norleucyl-leucyl-phenylalaninyl-nor-leucyl-tyrosyl-lysine-fluorescein, or CHO-NLFNTK-fl), G is the inactive G-protein, G* is the activated G-protein, and LR/LR*/LR<sub xmlns:mathml=\"http://www.w3.org/1998/Math/MathML\">ds</sub> represents the ligand/receptor complex in its various forms.</td></tr></table>\n\n</div>"
                    }
                ]
            }
        ],
        "version": "1.0",
        "links": [
            {
                "href": "http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6WMD-45FS9MH-1M&_coverDate=09%2F21%2F1999&_alid=60512469&_rdoc=1&_fmt=summary&_orig=search&_qd=1&_cdi=6932&_sort=d&_acct=C000011498&_version=1&_urlVersion=0&_userid=140507&md5=eeedd4baf8e60b260f706ae4b2e8fe60",
                "prompt": "Modeling Activation and Desensitisation of G-Protein Coupled Receptors Provides Insight into Ligand Efficacy",
                "rel": "bookmark"
            },
            {
                "href": "http://www.sciencedirect.com/science?_ob=JournalURL&_cdi=6932&_auth=y&_acct=C000011498&_version=1&_urlVersion=0&_userid=140507&md5=c8e64d20ff203cda2255f4b6b7affe4f",
                "prompt": "\n            ",
                "rel": "bookmark"
            },
            {
                "href": "http://www.sciencedirect.com/science?_ob=MImg&_imagekey=B6WMD-45FS9MH-1M-1&_cdi=6932&_orig=search&_coverDate=09%2F21%2F1999&_qd=1&_sk=997999997&wchp=dGLbVlb-lSzBA&_acct=C000011498&_version=1&_userid=140507&md5=eac152447fa4c1ee1cb9479ee44b8e77&ie=f.pdf",
                "prompt": "PDF",
                "rel": "bookmark"
            },
            {
                "href": "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=10504286&dopt=Abstract",
                "prompt": "PubMed ID: 10504286",
                "rel": "bookmark"
            }
        ]
    }
}

Is this intended behavior?

bilalshaikh42 commented 2 years ago

Looking at this more closely, I realized that a request to https://models.physiomeproject.org/exposure/e340f005288ec6bd49535cf792769dd0 redirects to https://models.physiomeproject.org/exposure/e340f005288ec6bd49535cf792769dd0/document_view rather than https://models.physiomeproject.org/exposure/e340f005288ec6bd49535cf792769dd0/exposure_info like the other exposures do. That does explain the discrepancy in the response.

Is there a reason this exposure does not redirect to the expected exposure_info endpoint?

metatoaster commented 2 years ago

Yes, the reason being that the exposure was created with a textual document specified for the root exposure object, such that a view was generated for it, rather than triggering the redirection to the only model file being exposed as an exposure file for that exposure.

This tends to be an issue for earlier exposures as that was how exposures were created.