Skip to content

VEP API returns invalid JSON when using allele string "NAN" #710

Description

@bprize15

When making a request to Ensembl's publicly available API, using NAN as an allele causes the returned JSON to be invalid.

To reproduce:

  1. Set request URL to http://grch37.rest.ensembl.org/vep/human/hgvs/VARIANT?content-type=application/json
  2. Set request body to the following:
{
    "hgvs_notations": ["1:g.100183025delinsNAN"]
}
  1. The following is the returned response body:
[
    {
        "assembly_name": "GRCh37",
        "id": "1:g.100183025delinsNAN",
        "end": 100183025,
        "input": "1:g.100183025delinsNAN",
        "strand": 1,
        "colocated_variants": [
            {
                "end": 100183025,
                "start": 100183025,
                "allele_string": "COSMIC_MUTATION",
                "phenotype_or_disease": 1,
                "id": "COSV54921804",
                "strand": 1,
                "var_synonyms": {
                    "COSMIC": [
                        "COSM1688105"
                    ]
                },
                "somatic": 1,
                "seq_region_name": "1"
            }
        ],
        "start": 100183025,
        "most_severe_consequence": "frameshift_variant",
        "allele_string": "G/NAN",
        "transcript_consequences": [
            {
                "cdna_start": 1779,
                "protein_start": 393,
                "gene_symbol_source": "HGNC",
                "cds_start": 1177,
                "gene_symbol": "FRRS1",
                "consequence_terms": [
                    "frameshift_variant"
                ],
                "gene_id": "ENSG00000156869",
                "strand": -1,
                "cds_end": 1177,
                "cdna_end": 1779,
                "transcript_id": "ENST00000287474",
                "variant_allele":-nan,
                "protein_end": 393,
                "codons": "Cgg/NTNgg",
                "hgnc_id": 27622,
                "biotype": "protein_coding",
                "impact": "HIGH"
            },
            {
                "gene_symbol_source": "HGNC",
                "cdna_start": 1779,
                "protein_start": 393,
                "consequence_terms": [
                    "frameshift_variant"
                ],
                "gene_id": "ENSG00000156869",
                "cds_start": 1177,
                "gene_symbol": "FRRS1",
                "transcript_id": "ENST00000414213",
                "variant_allele":-nan,
                "protein_end": 393,
                "strand": -1,
                "cds_end": 1177,
                "cdna_end": 1779,
                "hgnc_id": 27622,
                "codons": "Cgg/NTNgg",
                "biotype": "protein_coding",
                "impact": "HIGH"
            },
            {
                "variant_allele":-nan,
                "transcript_id": "ENST00000489209",
                "gene_symbol_source": "HGNC",
                "strand": -1,
                "gene_id": "ENSG00000156869",
                "distance": 4961,
                "consequence_terms": [
                    "upstream_gene_variant"
                ],
                "biotype": "processed_transcript",
                "hgnc_id": 27622,
                "gene_symbol": "FRRS1",
                "impact": "MODIFIER"
            },
            {
                "consequence_terms": [
                    "upstream_gene_variant"
                ],
                "distance": 1810,
                "gene_id": "ENSG00000156869",
                "gene_symbol": "FRRS1",
                "impact": "MODIFIER",
                "hgnc_id": 27622,
                "biotype": "processed_transcript",
                "gene_symbol_source": "HGNC",
                "variant_allele":-nan,
                "transcript_id": "ENST00000492943",
                "strand": -1
            }
        ],
        "seq_region_name": "1"
    }
]

The important piece is the variant_allele field. You can see that variant_allele is set to -nan which is not valid JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions