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

csr limitation #444

Closed
pnrobinson opened this issue Aug 20, 2023 · 2 comments · Fixed by #448
Closed

csr limitation #444

pnrobinson opened this issue Aug 20, 2023 · 2 comments · Fixed by #448
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pnrobinson
Copy link
Member

pnrobinson commented Aug 20, 2023

When trying to load maxo.json, I get this:

java.lang.RuntimeException: org.monarchinitiative.phenol.graph.csr.InsufficientWidthException: 
Unable to encode 159 relation types using 15 slots

I am guessing that for our purposes, we are only interested in is_a relations (in many cases) and that we could offer an option to ignore some relations? I haven't looked in the code, but what is the reason for limiting to 15 slots?

@pnrobinson pnrobinson added the bug Something isn't working label Aug 20, 2023
@ielis
Copy link
Member

ielis commented Aug 21, 2023

Looks weird, a possible bug, since the code should be using Long (64 slots) to encode the relationship types. So, 15 slots sounds like a bug.

On the other hand, if there indeed are 159 relation types in MAxO, we'll have to either just use is_a or rework the code. I thought 64 bits would be enough for our use cases..

There is nothing too special about your code, right? I should just download the latest MAxO and try to load it to replicate the bug, right?

@ielis ielis linked a pull request Nov 1, 2023 that will close this issue
@ielis ielis added this to the v2.0.4 milestone Nov 3, 2023
@ielis
Copy link
Member

ielis commented Nov 20, 2023

FWIW, MAxO v2023-10-03 can now be loaded by running this on the latest develop:

  Path path = Path.of("path/to/maxo.json");
  CurieUtil curieUtil = CurieUtilBuilder.defaultCurieUtil();
  OntologyLoaderOptions options = OntologyLoaderOptions.builder()
    .discardNonPropagatingRelationships(true)
    .forceBuild(true)
    .build();
  MinimalOntology maxo = MinimalOntologyLoader.loadOntology(path.toFile(), curieUtil, options, "MAXO");

However, there is a disconnected node MAXO:0001487, so the build fails unless .forceBuild(true) is set.

Please reopen if you run into troubles again..

@ielis ielis closed this as completed Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants