glygener / glygen-issues

Repository for public GlyGen tickets
GNU General Public License v3.0
0 stars 0 forks source link

Contributions array in results in biomarker list api is empty #1281

Closed sujeetvkulkarni closed 5 days ago

sujeetvkulkarni commented 2 weeks ago

https://api.tst.glygen.org/biomarker/list?query= {"id":"4cb9fb05cf7e461c8f5c1c0ed9ca5af5","offset":1,"sort":"hit_score","limit":20,"order":"desc","filters":[]}

"contributions": [] is empty.

{
  "contributions": [],
  "formula": "sum(w + 0.01*f)",
  "variables": {
    "c": "condition name",
    "w": "condition weight",
    "f": "condition match frequency"
  }
}

Screenshot 2024-04-30 at 2 02 56 PM

rykahsay commented 2 weeks ago

Try now:

$ http POST :8082/biomarker/search < tests/examples/biomarker/search.json
HTTP/1.1 200 OK
Connection: close
Content-Length: 48
Content-Type: application/json
Date: Thu, 02 May 2024 10:50:40 GMT
Server: gunicorn

{
    "list_id": "d92052789b1bcfa57e9c36b868dae568"
}
$ http POST :8082/biomarker/list < tests/examples/biomarker/list.json 
HTTP/1.1 200 OK
Connection: close
Content-Length: 1656
Content-Type: application/json
Date: Thu, 02 May 2024 10:51:07 GMT
Server: gunicorn

{
    "cache_info": {
        "query": {
            "publication_id": "32234467"
        },
        "record_type": "biomarker",
        "search_type": "search",
        "ts": "2024-05-02 06:50:40 EDT-0400"
    },
    "filters": {
        "applied": [],
        "available": [
            {
                "id": "by_assessed_entity_type",
                "label": "By Entity Type",
                "options": [
                    {
                        "count": 1,
                        "id": "protein",
                        "label": "Protein",
                        "order": 1
                    }
                ],
                "order": 1,
                "tooltip": ""
            },
            {
                "id": "by_biomarker_role",
                "label": "By Biomarker Role",
                "options": [
                    {
                        "count": 1,
                        "id": "monitoring",
                        "label": "Monitoring",
                        "order": 2
                    },
                    {
                        "count": 1,
                        "id": "prognostic",
                        "label": "Prognostic",
                        "order": 4
                    }
                ],
                "order": 2,
                "tooltip": ""
            }
        ]
    },
    "pagination": {
        "limit": 20,
        "offset": 1,
        "order": "desc",
        "sort": "hit_score",
        "total_length": 1
    },
    "results": [
        {
            "assessed_biomarker_entity": "Interleukin-6",
            "assessed_biomarker_entity_id": "P05231-1",
            "assessed_entity_type": "protein",
            "best_biomarker_role": "monitoring; prognostic",
            "biomarker": "increased IL6 level",
            "biomarker_canonical_id": "AA4686",
            "biomarker_id": "AA4686-2",
            "component_count": 1,
            "condition": "COVID-19 (DOID:0080600); 2019 Novel Coronavirus (2019-nCoV) (DOID:0080600); 2019-nCoV infection (DOID:0080600); Wuhan coronavirus infection (DOID:0080600); Wuhan seafood market pneumonia virus infection (DOID:0080600); COVID19 (DOID:0080600); SARS-CoV-2 infection (DOID:0080600)",
            "hit_score": 10.11,
            "record_type": "biomarker",
            "score_info": {
                "contributions": [
                    {
                        "c": "biomarker_exact_match",
                        "f": 0.0,
                        "w": 0.0
                    },
                    {
                        "c": "biomarker_component_count",
                        "f": 1.0,
                        "w": 10.0
                    }
                ],
                "formula": "sum(w + 0.01*f)",
                "variables": {
                    "c": "condition name",
                    "f": "condition match frequency",
                    "w": "condition weight"
                }
            },
            "specimen": " (0000178);  (0001977)"
        }
    ]
}
sujeetvkulkarni commented 5 days ago

07d41d44665aab78a7e767a53740c1469a34b61f