Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cryptic error message when trying to validate against beacon v2 schema #46

Open
mshadbolt opened this issue Jul 25, 2022 · 2 comments
Open

Comments

@mshadbolt
Copy link

mshadbolt commented Jul 25, 2022

Hello!

I was attempting to try out the biovalidator but I am running into errors and not sure where I am going wrong. Thanks in advance for any help or advice you can offer!

The inputs I am using are the beacon v2 genomicVariations defaultSchema and a genomic variant from a reference beacon below.

Here is the error output I get when I try to run the CLI version of biovalidator:

marionfs@5000L-205837-M biovalidator % node ./validator-cli.js -s ../beacon-v2-Models/BEACON-V2-draft4-Model/genomicVariations/defaultSchema.json -j ../../querying_beacon/ega_g_variants.json 
unknown format "int64" ignored in schema at path "#/definitions/Position/properties/start/items"
unknown format "int64" ignored in schema at path "#/definitions/Position/properties/start/items"
unknown format "int64" ignored in schema at path "#/definitions/Position/properties/end/items"
unknown format "int64" ignored in schema at path "#/definitions/Position/properties/end/items"
unknown format "int64" ignored in schema at path "#/definitions/Position/properties/start/items"
unknown format "int64" ignored in schema at path "#/definitions/Position/properties/start/items"
unknown format "int64" ignored in schema at path "#/definitions/Position/properties/end/items"
unknown format "int64" ignored in schema at path "#/definitions/Position/properties/end/items"
async schema compiled encountered and error
Error: async schema referenced by sync schema
    at callAsyncRef (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/vocabularies/core/ref.js:68:19)
    at callRef (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/vocabularies/core/ref.js:63:9)
    at callValidate (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/vocabularies/core/ref.js:34:13)
    at Object.code (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/vocabularies/core/ref.js:24:20)
    at Object.keywordCode (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/keyword.js:12:13)
    at /Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/iterate.js:16:35
    at CodeGen.code (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/codegen/index.js:438:13)
    at CodeGen.block (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/codegen/index.js:567:18)
    at Object.schemaKeywords (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/iterate.js:16:13)
    at typeAndKeywords (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/index.js:126:15)
    at subSchemaObjCode (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/index.js:113:5)
    at Object.subschemaCode (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/index.js:87:13)
    at Object.applySubschema (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/subschema.js:17:16)
    at KeywordCxt.subschema (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/context.js:145:28)
    at applyPropertySchema (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/vocabularies/applicator/properties.js:45:17)
    at Object.code (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/vocabularies/applicator/properties.js:33:17)
    at Object.keywordCode (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/keyword.js:12:13)
    at /Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/iterate.js:54:27
    at CodeGen.code (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/codegen/index.js:438:13)
    at CodeGen.block (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/codegen/index.js:567:18)
    at iterateKeywords (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/iterate.js:51:9)
    at groupKeywords (/Users/marionfs/Documents/GitHub/biovalidator/node_modules/ajv/dist/compile/validate/iterate.js:31:13)
2022-07-25T02:22:06.514Z [error] An error ocurred while running the validation. Error : {}
console error: [object Object]
2022-07-25T02:22:06.514Z [error] undefined
{
  "_id": ["62afade9676e4d25e5240835"],
  "variantType": ["SNP"],
  "alternateBases": ["T"],
  "frequencyInPopulations": [
    {
      "source": ["The Genome Aggregation Database (gnomAD)"],
      "sourceReference": ["https://gnomad.broadinstitute.org"],
      "frequencies": [
        {
          "population": ["AFR_AF"],
          "alleleFrequency": [-1]
        }
      ]
    },
    {
      "source": ["The Genome Aggregation Database (gnomAD)"],
      "sourceReference": ["https://gnomad.broadinstitute.org"],
      "frequencies": [
        {
          "alleleFrequency": [-1],
          "population": ["AMR_AF"]
        }
      ]
    },
    {
      "sourceReference": ["https://gnomad.broadinstitute.org"],
      "source": ["The Genome Aggregation Database (gnomAD)"],
      "frequencies": [
        {
          "population": ["EAS_AF"],
          "alleleFrequency": [-1]
        }
      ]
    },
    {
      "frequencies": [
        {
          "population": ["EUR_AF"],
          "alleleFrequency": [-1]
        }
      ],
      "source": ["The Genome Aggregation Database (gnomAD)"],
      "sourceReference": ["https://gnomad.broadinstitute.org"]
    },
    {
      "source": ["The Genome Aggregation Database (gnomAD)"],
      "sourceReference": ["https://gnomad.broadinstitute.org"],
      "frequencies": [
        {
          "alleleFrequency": [-1],
          "population": ["SAS_AF"]
        }
      ]
    }
  ],
  "variantLevelData": {
    "clinicalInterpretations": [
      {}
    ],
    "phenotypicEffects": [
      ["MODIFIER"]
    ]
  },
  "referenceBases": ["C"],
  "identifiers": {
    "clinVarIds": [
      {}
    ],
    "proteinHGVSIds": [
      {}
    ],
    "genomicHGVSId": [
      {}
    ]
  },
  "variantInternalId": ["chr21_9411318_C_T"],
  "position": {
    "start": [
      [9411317]
    ],
    "refseqId": ["21"],
    "end": [
      [9411318]
    ],
    "assemblyId": ["hs37"]
  },
  "molecularAttributes": {
    "aminoacidChanges": [
      {}
    ],
    "molecularEffects": [
      ["MODIFIER"]
    ],
    "geneIds": [
      ["CHR_START-MIR3648-1"]
    ]
  },
  "caseLevelData": [
    {
      "biosampleId": ["NA24695"],
      "individualId": ["NA24695"]
    },
    {
      "individualId": ["NA24694"],
      "biosampleId": ["NA24694"]
    },
    {
      "biosampleId": ["NA24631"],
      "individualId": ["NA24631"]
    }
  ]
}
@theisuru
Copy link
Collaborator

Hi @mshadbolt, Can you please share your npm and node version. I am getting a different error message with node v16.13.1.

node -v 
npm -v

@mshadbolt
Copy link
Author

Sure! Here's what I get:

marionfs@5000L-205837-M ~ % node -v
v16.13.0
marionfs@5000L-205837-M ~ % npm -v
8.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants