papaemmelab / ipssm-api

API and CLI for IPSS-M
MIT License
0 stars 0 forks source link

Return `TP53_loh: 1` when it's inferred from `TP53mut` and `TP53maxvaf` #14

Open juanesarango opened 2 months ago

juanesarango commented 2 months ago

When TP53_loh is inferred, the api still responds with 0

$ curl \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"HB": 10, "PLT": 100, "BM_BLAST": 5, "CYTO_IPSSR": "Intermediate", "TP53mut": "2 or more", "TP53maxvaf": 80}' \
    https://api.mds-risk-model.com/ipssm

Response:

{
  "patient": {
    "HB": 10,
    "PLT": 100,
    "BM_BLAST": 5,
    "CYTO_IPSSR": "Intermediate",
    "RUNX1": "NA",
    "TP53mut": "2 or more",
    "TP53maxvaf": 80,
    "del5q": 0,
    "del7_7q": 0,
    "del17_17p": 0,
    "complex": 0,
    "TP53loh": 0,
    "MLL_PTD": 0,
    "FLT3": 0,
    "ASXL1": 0,
    "CBL": 0,
    "DNMT3A": 0,
    "ETV6": 0,
    "EZH2": 0,
    "IDH2": 0,
    "KRAS": 0,
    "NPM1": 0,
    "NRAS": 0,
    "SF3B1": 0,
    "SRSF2": 0,
    "U2AF1": 0,
    "BCOR": 0,
    "BCORL1": 0,
    "CEBPA": 0,
    "ETNK1": 0,
    "GATA2": 0,
    "GNB1": 0,
    "IDH1": 0,
    "NF1": 0,
    "PHF6": 0,
    "PPM1D": 0,
    "PRPF8": 0,
    "PTPN11": 0,
    "SETBP1": 0,
    "STAG2": 0,
    "WT1": 0
  },
  "ipssm": {
    "means": {
      "riskScore": 1.48,
      "riskCat": "High"
    },
    "worst": {
      "riskScore": 2.02,
      "riskCat": "Very High"
    },
    "best": {
      "riskScore": 1.41,
      "riskCat": "High"
    }
  }
}

Current behavior:

It returns TP53loh: 0 even thought it should be inferred as TP53mut is 2 or more and it's maximum vaf is > 55%.

What should it return:

It should show: TP53_loh: 1, or add a new variable like: TP53_loh_inferred: 1

juanesarango commented 2 months ago

In the ipssm R package the behavior is that if input is TP53loh: 0 but it can be inferred, the output is TP53loh: 1