... | ... | @@ -481,11 +481,11 @@ As per the ClinGen Variant Curation Working Group recommendation a VCEP should b |
|
|
|
|
|
A legacy document with multiple gene specifications will be fully archived when the attribute `legacyReplaced` is set to `true`. This property will be true only AFTER all the linked specification documents are re-released. For example API to access a legacy document is given here. - `https://genboree.org/cspec/SequenceVariantInterpretation/id/GN023?fields=entContent.legacyReplaced`. All the corresponding individual, single gene specific documents can be accessed via - `https://genboree.org/cspec/SequenceVariantInterpretation/id/GN023?fields=ld.SequenceVariantInterpretation`. A superseded document fully replaces its legacy document only when the property `entContent.legacyFullySuperseded` is set to true. Identifiers for all the legacy documents in the Registry include - `GN014,GN016,GN004,GN005,GN011,GN018,GN023`
|
|
|
|
|
|
#### Current Approved Versions
|
|
|
#### Current Approved Versions with the gene and vcep info
|
|
|
|
|
|
Cspec Registry API on SequenceVariantInterpretation will return all the specifications that are both approved and under review.To get the current "Released" (SVI approved) versions do the following:
|
|
|
|
|
|
1. Get the SequenceVariantInterpretation documents, say for instance from the following endpoint - _https://cspec.genome.network/cspec/SequenceVariantInterpretation/id?detail=high&fields=entContent.states,entContent.legacyFullySuperseded,entContent.legacyReplaced,entId,ldhId,entContent.title_
|
|
|
1. Get the SequenceVariantInterpretation documents, say for instance from the following endpoint - _https://cspec.genome.network/cspec/SequenceVariantInterpretation/id?detail=high&fields=entContent.states,entContent.legacyFullySuperseded,entContent.legacyReplaced,entId,ldhId,entContent.title&pgSize=200_
|
|
|
2. Now drop the ones that
|
|
|
|
|
|
1. have never been approved, that is _entContent.states_ has NO item where name === 'Released'
|
... | ... | @@ -494,6 +494,25 @@ Cspec Registry API on SequenceVariantInterpretation will return all the specific |
|
|
|
|
|
For instance, given below is an example where the above logic is applied to the end point mentioned in step(1).
|
|
|
|
|
|
`let currentVersions = [] if( respObj && respObj.status && respObj.status === 200 ) { const sviObj = respObj.data.data for(const svi of sviObj){ if(svi.entContent.states) { const stateNames = svi.entContent.states.map((x) => x.name); if(stateNames.includes("Released")) { // has been approved if(svi.entContent.legacyFullySuperseded === false || svi.entContent.legacyReplaced === true) { // drop the doc that has not superseded the legacy yet or the ones that have been fully replaced. continue } else { currentVersions.push(svi.entId) } } } } `
|
|
|
` let currentVersions = []
|
|
|
const sviObj = resp.data.data
|
|
|
for( const svi of sviObj ) {
|
|
|
if( svi.entContent.states ) {
|
|
|
const stateNames = svi.entContent.states.map( ( x ) => x.name );
|
|
|
if( stateNames.includes( "Released" ) ) { // has been approved
|
|
|
if( svi.entContent.legacyFullySuperseded === false || svi.entContent.legacyReplaced === true ) { // drop the doc
|
|
|
// that has not superseded the legacy yet or the ones that have been fully replaced.
|
|
|
continue
|
|
|
} else {
|
|
|
// get the RuleSet, where the gene
|
|
|
const rs = svi.ld.RuleSet[0]
|
|
|
const gene = rs.entContent.genes ? rs.entContent.genes[0].gene : ""
|
|
|
const vcep = svi.ldFor.Organization[0].entContent.title
|
|
|
currentVersions.push( { svi : svi.entId, gene: gene, vcep: vcep} )
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
`
|
|
|
|
|
|
### [Markdown support for Criteria Code Specifications](Markdown-and-Citations) |
|
|
\ No newline at end of file |