griffithlab / civic-v2

CIViC is an open access, open source, community-driven web resource for Clinical Interpretation of Variants in Cancer
https://civicdb.org
MIT License
19 stars 5 forks source link

"Genes" query returns different number of variants compared to "Variants" query #980

Closed leexgh closed 9 months ago

leexgh commented 9 months ago

Query the same gene: PRKACA in "genes" and "variants":

Genes

query genes($after: String, $entrezSymbols: [String!]) {
  genes(after: $after, entrezSymbols: $entrezSymbols) {
      pageInfo {
          endCursor
          hasNextPage
          startCursor
          hasPreviousPage
      }
      nodes {
          id
          description
          link
          name
          variants {
            pageInfo {
              endCursor
              hasNextPage
              startCursor
              hasPreviousPage
            }
            nodes {
              name
              id
              link
              singleVariantMolecularProfile {
                  evidenceCountsByType {
                      diagnosticCount
                      predictiveCount
                      prognosticCount
                      predisposingCount
                      oncogenicCount
                      functionalCount
                  }
               }
            }
            totalCount
          }
      }
  }
}

Query variables:

{"entrezSymbols": ["PRKACA"]}

Variants in response:

         "nodes": [
              {
                "name": "DNAJB1-PRKACA",
                "id": 109,
                "link": "/variants/109",
                "singleVariantMolecularProfile": {
                  "evidenceCountsByType": {
                    "diagnosticCount": 0,
                    "predictiveCount": 0,
                    "prognosticCount": 0,
                    "predisposingCount": 0,
                    "oncogenicCount": 0,
                    "functionalCount": 0
                  }
                }
              },
              {
                "name": "DNAJB1::PRKACA",
                "id": 31,
                "link": "/variants/31",
                "singleVariantMolecularProfile": {
                  "evidenceCountsByType": {
                    "diagnosticCount": 4,
                    "predictiveCount": 0,
                    "prognosticCount": 0,
                    "predisposingCount": 0,
                    "oncogenicCount": 0,
                    "functionalCount": 0
                  }
                }
              }
            ],
            "totalCount": 2

Variants

query variants($after: String, $geneId: Int) {
  variants(after: $after, geneId: $geneId) { 
    pageInfo {
      endCursor
      hasNextPage
      startCursor
      hasPreviousPage
    }
      nodes {
        id
        name
        link
        singleVariantMolecularProfile {
          evidenceCountsByType {
            diagnosticCount
            predictiveCount
            prognosticCount
            predisposingCount
            oncogenicCount
            functionalCount
          }
        }
      } 
      totalCount
    }
}

Query variables:

{"geneId":17}

Variants in response:

    "nodes": [
        {
          "id": 31,
          "name": "DNAJB1::PRKACA",
          "link": "/variants/31",
          "singleVariantMolecularProfile": {
            "evidenceCountsByType": {
              "diagnosticCount": 4,
              "predictiveCount": 0,
              "prognosticCount": 0,
              "predisposingCount": 0,
              "oncogenicCount": 0,
              "functionalCount": 0
            }
          }
        }
      ],
      "totalCount": 1

In Genes query, there is one extra variant returned: DNAJB1-PRKACA compared to Variants query, based on the note: https://civicdb.org/variants/109/summary, this variant is deprecated and should be removed from the response.

The issue is also observed in BRAF where Genes returns 124 variants and Variants returns 121 variants.