1.0.4 • Published 8 months ago

ipssm v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Compute IPSS-M and IPSS-M Risks on IWG-PM Cohort (Bernard et al, 2022 NJEM Evid)

npm version npm badge

ipssm (js)

Javascript/Node Package for the Molecular International Prognostic Scoring System (IPSS-M) for Myelodysplastic Syndromes.

Table of contents

inputs

:page_with_curl: IPSS-M Publication

Bernard E, Tuechler H, Greenberg PL, Hasserjian RP, Arango Ossa JE et al. Molecular International Prognostic Scoring System for Myelodysplastic Syndromes, NEJM Evidence 2022.

:rocket: Installation instructions

# Using npm
npm install ipssm

:boom: IPSS-M Usage

:fire: Compute IPSS-M

Having a patient's data in a dictionary, you can compute the IPSS-M.

const { ipssm } from 'ipssm'

// Add patient data to an object with the following fields
const patientFields = {
  // Clinical Data
  BM_BLAST: 0,
  HB: 8.2,
  PLT: 239,
  // Optional IPSS-R fields
  ANC: 0.72,
  AGE: 63.5,
  // Cytogenetic Data 
  del5q: 0,
  del7_7q: 0,
  del17_17p: 0,
  complex: 0, 
  CYTO_IPSSR: 'Good',
  // Molecular Data
  TP53mut: 0,
  TP53maxvaf: 0,
  TP53loh: 0,
  MLL_PTD: 0,
  FLT3: 0,
  ASXL1: 1,
  CBL: 0,
  DNMT3A: 0,
  ETV6: 0,
  EZH2: 1,
  IDH2: 0,
  KRAS: 0,
  NPM1: 0,
  NRAS: 0,
  RUNX1: 1,
  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,
}

const ipssmResult = ipssm(patientFields)
console.log(ipssmResult)
// Result
{
  means: {
    riskScore: 0.09,
    riskCat: 'Moderate High',
    contributions: {...}
  },
  best: {
    riskScore: 0.09,
    riskCat: 'Moderate High',
    contributions: {...}
  },
  worst: {
    riskScore: 0.09,
    riskCat: 'Moderate High',
    contributions: {...}
  },
}

:zap: IPSS-R and IPSS-R (Age adjusted)

Additionally, you may find an implementation to compute the IPPS-R and IPSS-R (Age adjusted) in this module:

import { ipssr } from 'ipssm'

// using the same patient data
patientFields = {
  HB: 8.2,
  ANC: 0.72,
  PLT: 239,
  BM_BLAST: 0,
  CYTOVEC: 1,
  AGE: 63.5,
  ...
}

const ipssrResult = ipssr({
  hb: patientFields.HB,
  anc: patientFields.ANC,
  plt: patientFields.PLT,
  bmblast: patientFields.BM_BLAST,
  cytovec: patientFields.CYTOVEC,
  age: patientFields.AGE,
})

console.log(ipssrResult)

Which outputs a risk score (means), with a best and worst scenario risk score to account for missing genetic data.

// Result
{
    IPSSR_SCORE: 2.5,
    IPSSR: 'Low',
    IPSSRA_SCORE: 2.2563,
    IPSSRA: 'Low',
}

:dart: Annotating batch from CSV/Excel file

The following code will annotate a CSV file with the IPSS-M and IPSS-M Risks.

import { annotateFile } from 'ipssm'

const inputFile = './test/data/IPSSMexample.csv'
const outputFile = 'IPSSMexample.annotated.csv'

await annotateFile(inputFile, outputFile)

or with an excel file:

import { annotateFile } from 'ipssm'

const inputFile = './test/data/IPSSMexample.xlsx'
const outputFile = 'IPSSMexample.annotated.xlsx'

await annotateFile(inputFile, outputFile)

:mechanical_arm: Using the command line interface

You can use the command line interface to annotate a file with patients, where each row is a patient and each column is a variable.

$  ipssm --help

Annotate a file of patients with IPSS-M and IPSS-R risk scores and categories.
It supports .csv, .tsv, .xlsx files.

Usage: ipssm <inputFile> <outputFile>

Positionals:
  inputFile   File to be annotated (rows: patients, columns: variables).[string]
  outputFile  Path for the annotated output file.                       [string]

Options:
      --version  Show version number                                   [boolean]
  -h, --help     Show help                                             [boolean]

:spiral_notepad: Input Variables Definition

CategoryVariable ExplanationVariableUnitPossible Value
clinicalHemoglobinHBnumerical, in g/dL4-20
clinicalPlateletsPLTnumerical, in Giga/L0-2000
clinicalBone Marrow BlastsBM_BLASTnumerical, in %0-30
clinical (only for IPSS-R)Absolute Neutrophil CountANCnumerical, in Giga/L0-15
clinical (only for IPSS-RA)Bone Marrow BlastsAGEnumerical, in years18-120
cytogeneticsPresence of del(5q)del5qbinary0/1
cytogeneticsPresence of -7/del(7q)del7_7qbinary0/1
cytogeneticsPresence of -17/del(17p)del17_17pbinary0/1
cytogeneticsComplex karyotypecomplexbinary0/1
cytogeneticsCytogenetics CategoryCYTO_IPSSRcategoricalVery Good/Good/Intermediate/Poor/Very Poor
TP53 locusNumber of TP53 mutationsTP53mutcategorical0/1/2 or more
TP53 locusMaximum TP53 VAFTP53maxvafnumerical, between 0 and 10-1
TP53 locusLoss of heterozygosity at TP53TP53lohbinary0/1
MLL and FLT3 mutationsMLL PTDMLL_PTDbinary0/1
MLL and FLT3 mutationsFLT3 ITD or TKDFLT3binary0/1
gene main effectASXL1ASXL1binary0/1/NA
gene main effectCBLCBLbinary0/1/NA
gene main effectDNMT3ADNMT3Abinary0/1/NA
gene main effectETV6ETV6binary0/1/NA
gene main effectEZH2EZH2binary0/1/NA
gene main effectIDH2IDH2binary0/1/NA
gene main effectKRASKRASbinary0/1/NA
gene main effectNPM1NPM1binary0/1/NA
gene main effectNRASNRASbinary0/1/NA
gene main effectRUNX1RUNX1binary0/1/NA
gene main effectSF3B1SF3B1binary0/1/NA
gene main effectSRSF2SRSF2binary0/1/NA
gene main effectU2AF1U2AF1binary0/1/NA
gene residualBCORbinary0/1/NA
gene residualBCORL1binary0/1/NA
gene residualCEBPAbinary0/1/NA
gene residualETNK1binary0/1/NA
gene residualGATA2binary0/1/NA
gene residualGNB1binary0/1/NA
gene residualIDH1binary0/1/NA
gene residualNF1binary0/1/NA
gene residualPHF6binary0/1/NA
gene residualPPM1Dbinary0/1/NA
gene residualPTPN11binary0/1/NA
gene residualPRPF8binary0/1/NA
gene residualSETBP1binary0/1/NA
gene residualSTAG2binary0/1/NA
gene residualWT1binary0/1/NA

:question: Question

Any questions feel free to add an issue to this repo or to contact ElsaB.

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago