|
[[_TOC_]]
|
|
[[_TOC_]]
|
|
|
|
|
|
### Assertion API
|
|
### Assertion API
|
|
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)**
|
|
Assertion API endpoint for computing variant pathogenicity given a set of evidence counts and assertion criteria. 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>
|
|
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).
|
|
**Summary of Sequence Variant Interpretation Reasoner service route which interprets a variant pathogenicity assertion from Evidence and** [**Criteria Specification**](https://cspec.genome.network)
|
|
|
|
|
|
> A **payload** contains two required fields - evidence and cspecRuleSetUrl.
|
|
1. Request to the engine service _assertion_ route.
|
|
> An example of a payload object is given below:
|
|
|
|
|
|
> **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:
|
|
>
|
|
>
|
|
> ```
|
|
> ```plaintext
|
|
> let payload = {
|
|
> let payload = {
|
|
> cspecRuleSetUrl: 'https://cspec.genome.network/cspec/RuleSet/id//643243101',
|
|
> cspecRuleSetUrl: 'https://cspec.genome.network/cspec/RuleSet/id/643243101',
|
|
> evidence: {
|
|
> evidence: {
|
|
> 'Pathogenic.Moderate': 2,
|
|
> 'Pathogenic.Moderate': 2,
|
|
> 'Pathogenic.Strong': 1,
|
|
> 'Pathogenic.Strong': 1,
|
|
> 'Pathogenic.Supporting': 1
|
|
> 'Pathogenic.Supporting': 1,
|
|
|
|
> 'Pathogenic.Very Strong': 1
|
|
> }
|
|
> }
|
|
> }
|
|
> }
|
|
> ```
|
|
> ```
|
|
|
|
|
|
|
|
A.4) Example of how the route works:
|
|
|
|
|
|
A.4) Example of how the route works:
|
|
```plaintext
|
|
```
|
|
|
|
const SimpleJsonReq = require( "@brl/brl-gb/client/simple/simpleJsonReq" ).SimpleJsonReq
|
|
const SimpleJsonReq = require( "@brl/brl-gb/client/simple/simpleJsonReq" ).SimpleJsonReq
|
|
let baseUrl = "https://cspec.genome.network/cspec/eng/svi"
|
|
let baseUrl = "https://cspec.genome.network/cspec/eng/svi"
|
|
let clientOpts = { timeout: 600000 }
|
|
let clientOpts = { timeout: 600000 }
|
... | @@ -36,53 +38,15 @@ let reqConfig = { |
... | @@ -36,53 +38,15 @@ let reqConfig = { |
|
data: payload
|
|
data: payload
|
|
}
|
|
}
|
|
resp = await jsClient.doGet('/assertion', reqConfig)
|
|
resp = await jsClient.doGet('/assertion', reqConfig)
|
|
> let engRespObj = global.brl.dot.pick('data', resp.data)
|
|
> global.brl.dot.pick('data', resp.data)
|
|
undefined
|
|
{ comment:
|
|
> engRespObj
|
|
'Two assertions: Pathogenic and Likely Pathogenic were made. In such case the final call is the highest strength call, hence the allele is Pathogenic',
|
|
{
|
|
finalCall: 'Pathogenic',
|
|
comment: 'As the rules only suggest one assertion that is Likely Pathogenic, the final assertion is Likely Pathogenic',
|
|
rules:
|
|
finalCall: 'Likely Pathogenic',
|
|
[ { conditions: [Array], inference: 'Pathogenic', rule: 'Rule1' },
|
|
rules: // List of rules that are satisfied
|
|
{ conditions: [Array], inference: 'Pathogenic', rule: 'Rule2' },
|
|
[ { _conditions: [Array],
|
|
{ conditions: [Array],
|
|
_inference: 'Likely Pathogenic',
|
|
inference: 'Likely Pathogenic',
|
|
_name: 'Rule20',
|
|
rule: 'Rule20' } ],
|
|
_satisfied: true,
|
|
statusObj: { name: 'assertion computed', status: 'ok' } }
|
|
_statement: 'Pathogenic.Strong ==1 & Pathogenic.Moderate ==2' } ],
|
|
|
|
statusObj: { // statusObj with status and name
|
|
|
|
name: 'assertion computed',
|
|
|
|
status: 'ok'
|
|
|
|
}
|
|
|
|
``` |
|
``` |
|
|
|
\ No newline at end of file |
|
}
|
|
|
|
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 |
|
|