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

There should be a way to write xrefs to API nodes rather than Site nodes #236

Open
Robbie1977 opened this issue May 14, 2021 · 4 comments · May be fixed by #241
Open

There should be a way to write xrefs to API nodes rather than Site nodes #236

Robbie1977 opened this issue May 14, 2021 · 4 comments · May be fixed by #241
Assignees
Labels

Comments

@Robbie1977
Copy link
Contributor

We now have an API node (short_form:jrc_slide_code_api) for adding Janelia slide codes without exposing them as there is no 'Site' that links could work too. This works fine however curation fails when writing (not at testing!?) as the matching 'Site' node doesn't exist (as it's :api).

This isn't urgent as we can bypass but api nodes might become more common in future for adding non linking IDs/Meta.

Accepting either Site or api labels for matching xref links would resolve this.

@dosumis
Copy link
Member

dosumis commented Sep 28, 2021

Addition of xrefs currently assumes site node: https://github.com/VirtualFlyBrain/VFB_neo4j/blob/master/src/uk/ac/ebi/vfb/neo4j/KB_tools.py#L357

Options:

  • Extend this function with kwarg specifying :Site as default otype. Challenge - how to make this easy to spec in addition patterns - will this need yet another arg?
  • Allow otype to be either API or Site. Can we do this in one write statement? Or do we need to try Site & if that fails try with API?

Challenge - how to make this ieasy

@Clare72
Copy link
Contributor

Clare72 commented Sep 29, 2021

is it possible to add a parent node type e.g. 'xref' node that would encompass anything we might want to use in an xref - 'Site' or 'API' or anything else we might want in future? then we could use that for the otype.

@dosumis
Copy link
Member

dosumis commented Sep 29, 2021

There's no hierarchy in neo :labels. We need to be able to specify API vs Site in order to direct whether the xref will be used to generate a link on VFB (Site nodes only) or not.

@dosumis
Copy link
Member

dosumis commented Sep 29, 2021

Probably easiest to add yet another arg here allowing api_xrefs:

https://github.com/VirtualFlyBrain/VFB_neo4j/blob/master/src/uk/ac/ebi/vfb/neo4j/KB_tools.py#L875

Supporting this by modifying the add_xref method with kwarg to support addition of xrefs to API nodes, with 'Site' as default to prevent this from breaking current usage.

@Clare72 Clare72 linked a pull request Sep 29, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants