|
|
|
Assertion API endpoint for computing variant pathogenicity given a set of evidence counts and the specification to use. The specification used here is based on _Standards and guidelines for the interpretation of sequence variants: a joint consensus recommendation of the American College of Medical Genetics and Genomics and the Association for Molecular Pathology_. Richards _et.al_ (https://pubmed.ncbi.nlm.nih.gov/25741868/). For ClinGen VCEP specific assertion criteria refer the CSpec Registry - https://cspec.genome.network
|
|
|
|
|
|
|
|
**Summary of Sequence Variant Interpretation Reasoner service route which interprets a variant pathogenicity assertion from Evidence and [Criteria Specification](https://cspec.genome.network)**
|
|
|
|
1. Request to the engine service _assertion_ route.
|
|
|
|
|
|
|
|
> **Route** for the assertion engine is - https://cspec.genome.network/cspec/eng/svi/assertion. This is a GET route with a payload (see next).
|
|
|
|
|
|
|
|
> A **payload** contains two required fields - evidence and cspecRuleSetUrl.
|
|
|
|
> An example of a payload object is given below:
|
|
|
|
>
|
|
|
|
> ```
|
|
|
|
> let payload = {
|
|
|
|
> cspecRuleSetUrl: 'https://cspec.genome.network/cspec/RuleSet/id//643243101',
|
|
|
|
> evidence: {
|
|
|
|
> 'Pathogenic.Moderate': 2,
|
|
|
|
> 'Pathogenic.Strong': 1,
|
|
|
|
> 'Pathogenic.Supporting': 1
|
|
|
|
> }
|
|
|
|
> }
|
|
|
|
> ```
|
|
|
|
|
|
|
|
|
|
|
|
A.4) Example of how the route works:
|
|
|
|
```
|
|
|
|
const SimpleJsonReq = require( "@brl/brl-gb/client/simple/simpleJsonReq" ).SimpleJsonReq
|
|
|
|
let baseUrl = "https://cspec.genome.network/cspec/eng/svi"
|
|
|
|
let clientOpts = { timeout: 600000 }
|
|
|
|
let jsClient = undefined
|
|
|
|
let resp = undefined
|
|
|
|
jsClient = new SimpleJsonReq( baseUrl, clientOpts )
|
|
|
|
let reqConfig = {
|
|
|
|
serverCertCheck : false,
|
|
|
|
data: payload
|
|
|
|
}
|
|
|
|
resp = await jsClient.doGet('/assertion', reqConfig)
|
|
|
|
> let engRespObj = global.brl.dot.pick('data', resp.data)
|
|
|
|
undefined
|
|
|
|
> engRespObj
|
|
|
|
{
|
|
|
|
comment: 'As the rules only suggest one assertion that is Likely Pathogenic, the final assertion is Likely Pathogenic',
|
|
|
|
finalCall: 'Likely Pathogenic',
|
|
|
|
rules: // List of rules that are satisfied
|
|
|
|
[ { _conditions: [Array],
|
|
|
|
_inference: 'Likely Pathogenic',
|
|
|
|
_name: 'Rule20',
|
|
|
|
_satisfied: true,
|
|
|
|
_statement: 'Pathogenic.Strong ==1 & Pathogenic.Moderate ==2' } ],
|
|
|
|
statusObj: { // statusObj with status and name
|
|
|
|
name: 'assertion computed',
|
|
|
|
status: 'ok'
|
|
|
|
}
|
|
|
|
```
|
|
|
|
}
|
|
|
|
A.5. The SVI ENGINE helper classes - making an assertion interpretation with evidence and rules
|
|
|
|
A.5.1) Separate classes for Rule, MetRule, Interpretation and Condition are implemented.
|
|
|
|
A.5.2) Example of how it works
|
|
|
|
//get cspec rules and metarules by making a request to the cspec service as shown below
|
|
|
|
const BrlGbApp = require( "@brl/brl-gb/app/brlGbApp" )
|
|
|
|
BrlGbApp.globalPrep()
|
|
|
|
const SimpleJsonReq = require( "@brl/brl-gb/client/simple/simpleJsonReq" ).SimpleJsonReq
|
|
|
|
let clientOpts = { timeout: 600000 }
|
|
|
|
let baseUrl = 'https://cspec.genome.network/cspec'
|
|
|
|
let jsClient = new SimpleJsonReq( baseUrl, clientOpts )
|
|
|
|
jsClient = new SimpleJsonReq( baseUrl, clientOpts )
|
|
|
|
let resp
|
|
|
|
resp = await jsClient.doGet('/SequenceVariantInterpretation/id/GN006', {serverCertCheck:false})
|
|
|
|
|
|
|
|
// run the assertion engine
|
|
|
|
const Interpretation = require ('@brl/cspec-eng-svi/helpers/reasoner/interpretation').Interpretation
|
|
|
|
let guidelineMetaRules = resp.data.data.entContent.guidelineMetaRules
|
|
|
|
let evidence = { 'Pathogenic.Moderate': 2, 'Pathogenic.Strong': 1, 'Pathogenic.Supporting': 1 }
|
|
|
|
const int = new Interpretation(evidence, guidelineMetaRules)
|
|
|
|
resp = await int.makeInterpretation()
|
|
|
|
console.log(resp)
|
|
|
|
{ rules:
|
|
|
|
[ Rule {
|
|
|
|
_conditions: [Array],
|
|
|
|
_inference: 'Likely Pathogenic',
|
|
|
|
_name: 'Rule20',
|
|
|
|
_satisfied: true,
|
|
|
|
_statement: 'Pathogenic.Strong ==1 & Pathogenic.Moderate ==2' } ],
|
|
|
|
finalCall: 'Likely Pathogenic',
|
|
|
|
comment:
|
|
|
|
'As the rules only suggest one assertion that is Likely Pathogenic, the final assertion is Likely Pathogenic',
|
|
|
|
statusObj: { status: 'ok', name: 'assertion computed' } } |
|
|
|
\ No newline at end of file |