RTXteam / RTX

Software repo for Team Expander Agent (Oregon State U., Institute for Systems Biology, and Penn State U.)
https://arax.ncats.io/
MIT License
33 stars 21 forks source link

UI issue with displaying multiple source_record_urls #2346

Closed amykglen closed 3 weeks ago

amykglen commented 2 months ago

I noticed in the UI (arax.ncats.io/beta) that when there are multiple source_record_urls (which is a list data type) on an edge source, the UI displays and hyperlinks them as one link - see red hyperlink below:

Screenshot 2024-08-08 at 8 05 21 PM

the URL it tries to send you to in that example is:

https://db.systemsbiology.net/gestalt/cgi-pub/KGinfo.pl?id=d67d8173-eea6-3d19-a33c-35b2c0119e3b,https://db.systemsbiology.net/gestalt/cgi-pub/KGinfo.pl?id=ffcd1fe3-d9e8-36e2-8e9a-72f8fd1deccf

which unsurprisingly gives an error

but I can see in the raw JSON that the URLs are indeed separate items in a list, as they're supposed to be:

            {
              "resource_id": "infores:multiomics-clinicaltrials",
              "resource_role": "aggregator_knowledge_source",
              "upstream_resource_ids": [
                "infores:aact"
              ],
              "source_record_urls": [
                "https://db.systemsbiology.net/gestalt/cgi-pub/KGinfo.pl?id=d67d8173-eea6-3d19-a33c-35b2c0119e3b",
                "https://db.systemsbiology.net/gestalt/cgi-pub/KGinfo.pl?id=ffcd1fe3-d9e8-36e2-8e9a-72f8fd1deccf"
              ]
            }

I don't have an ARAX/ARS response id to share for this example, sorry - I ran this query by setting the External API to https://ctkp.rtx.ai:9990 in the Settings tab in the UI and then doing 'Post to OTHER' for this query:

{
  "edges": {
    "e00": {
      "subject": "n00",
      "object": "n01",
      "predicates": [
        "biolink:in_clinical_trials_for"
      ]
    }
  },
  "nodes": {
    "n00": {
      "ids": [
        "UNII:TS63EW8X6F"
      ]
    },
    "n01": {
      "ids": [
        "MONDO:0005148"
      ]
    }
  }
}

thanks!

isbluis commented 2 months ago

Hi @amykglen . Thanks for the report; always hard to code when there is not set datatype in the schema! I have a fix in devLM; let me know if you are able to have a look and whether I broke something else in the process :) https://arax.ncats.io/devLM/index.html

amykglen commented 2 months ago

it looks great, thanks!

isbluis commented 3 weeks ago

Closing