Skip to content
Alpha: see what works today →
Menu

Matcher rule

same-variation-key-joined-first

Two records of one kind match when their current versions share a ClinVar VariationID. A VariationID names a variation, not a transcript, so two reports on different transcript versions of one variant match here. No table is read, and HGVS expressions are not compared: the rule that reads a variant classifications table joins those that a row finds. Each ordered pair is a row.

The query

PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX pav: <http://purl.org/pav/>

SELECT DISTINCT ?record ?other
WHERE {
  ?record pav:hasCurrentVersion ?version .
  ?version cascade:clinvarVariationId ?id .
  ?otherVersion cascade:clinvarVariationId ?id .
  ?other pav:hasCurrentVersion ?otherVersion .
  ?record cascade:recordKind ?kind .
  ?other cascade:recordKind ?otherKind .
  FILTER (?record != ?other && sameTerm(?kind, ?otherKind))
}

Terms it reads

cascade:clinvarVariationId · cascade:recordKind · pav:hasCurrentVersion

Rules and decision notes that name it

queries/matcher/same-variation-key-joined-first.rq on GitHub ↗