opentargets / issues

Issue tracker for Open Targets Platform and Open Targets Genetics Portal
https://platform.opentargets.org https://genetics.opentargets.org
Apache License 2.0
12 stars 2 forks source link

Unavailable clinical trials start dates seem to be displayed incorrectly as 1970 #2528

Closed ellimilial closed 2 years ago

ellimilial commented 2 years ago

Describe the bug Some clinical trials start dates are incorrectly displayed as 1970 in the evidences / drugs view on the OT platform.

Observed behaviour A surprisingly large amount of clinical trials are dated as 1970.

Expected behaviour A correct or no date should be displayed for each clinical trial.

To Reproduce Go to https://platform.opentargets.org/evidence/ENSG00000100804/EFO_0000191 Scroll down to ChEMBL section Look at Start date column. Row referring to NCT00373906 has Start date set to 1970.

Additional context Also visible at https://platform.opentargets.org/evidence/ENSG00000165731/EFO_0000311 where more data is present. The clinical trial does not seem to contain a start date - verified by downloading a TSV file from the interface. Speculation: 1970 is the start of UNIX time epoch, perhaps a none is mishandled.

ireneisdoomed commented 2 years ago

Thank you very much for reporting this @ellimilial. I have been able to reproduce the error and you're completely right, studyStartDate is null in the examples you pasted above. Moreover, we have no evidence where the trial began in 1970.

@LucaFumis @carcruz Can you check how this is handled in the FE?

d0choa commented 2 years ago

The problem is that nulls are not nicely handled in this line of code.

API query example and response for APP-Alzheimer evidence page:

query{
  target(ensemblId: "ENSG00000142192"){
    evidences(efoIds: "MONDO_0004975", datasourceIds: ["chembl"]){
      rows{
        studyStartDate
      }
    }
  }
}
{
  "data": {
    "target": {
      "evidences": {
        "rows": [
          {
            "studyStartDate": null
          },
          {
            "studyStartDate": "2009-12-01"
          },
          {
            "studyStartDate": "2017-03-29"
          },
          {
d0choa commented 2 years ago

Thanks, @ellimilial for reporting and @remo87 for the fix! This will go live in the upcoming April Platform release