Skip to content

IndexError: list index out of range in utility.get_context_using_spoke_api #42

@hyunwhanjoe

Description

@hyunwhanjoe

Hi, for the question "Neurofibromatosis 2 is not associated with Gene NF2" in the True/False dataset, the json result for the matched SPOKE entity 'neurofibromatosis 2' results in an empty list at line 75 node_context = result.json(). This results in an IndexError when you call node_context[0] in line 128.

My guess is that 'neurofibromatosis 2' got removed from the SPOKE KG during an update.

Using data/context_of_disease_which_has_relation_to_genes.csv while passing api=False to the function utility.retrieve_context is my current workaround for the issue. It seems this csv file has the old KG information that was used in the publication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions