Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C CSpec Reasoner SVI
  • Project information
    • Project information
    • Activity
    • Members
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • ClinGenClinGen
  • cspec
  • CSpec Reasoner SVI
  • Wiki
  • API

API · Changes

Page history
Update API authored Nov 03, 2022 by Neethu Shah's avatar Neethu Shah
Hide whitespace changes
Inline Side-by-side
API.md
View page @ b2a61dd6
[[_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).
> A **payload** contains two required fields - evidence and cspecRuleSetUrl. **Summary of Sequence Variant Interpretation Reasoner service route which interprets a variant pathogenicity assertion from Evidence and** [**Criteria Specification**](https://cspec.genome.network)
> An example of a payload object is given below:
> 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:
>
> ```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 \ No newline at end of file
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
Clone repository
  • API
  • Home