GithubHelp home page GithubHelp logo

Comments (9)

josephwb avatar josephwb commented on August 28, 2024

Seems like an OpenTree problem:

curl -X POST http://devapi.opentreeoflife.org/v2/tree_of_life/induced_subtree -H "Content-Type:application/json" -d '{"ott_ids":[357968,867416,939325,462102]}'
{
  "message" : "Index: 32, Size: 32",
  "exception" : "IndexOutOfBoundsException",
  "fullname" : "java.lang.IndexOutOfBoundsException",
  "stacktrace" : [ "java.util.ArrayList.rangeCheck(ArrayList.java:635)", "java.util.ArrayList.get(ArrayList.java:411)", "opentree.GraphExplorer.getDraftTreeMRCAForNodes(GraphExplorer.java:360)", "opentree.GraphExplorer.extractDraftSubtreeForTipNodes(GraphExplorer.java:468)", "opentree.plugins.tree_of_life.induced_subtree(tree_of_life.java:315)", "java.lang.reflect.Method.invoke(Method.java:606)", "org.neo4j.server.plugins.PluginMethod.invoke(PluginMethod.java:57)", "org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:168)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:300)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:122)", "java.lang.reflect.Method.invoke(Method.java:606)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)" ]
}

I hope to get this fixed today.

from rotl.

jhpoelen avatar jhpoelen commented on August 28, 2024

Thanks!

from rotl.

jhpoelen avatar jhpoelen commented on August 28, 2024

I've attempted to reproduce the issue, hoping to close this issue. Here's what I got:

> rotl::tol_induced_subtree(ott_ids = c(357968, 867416, 939325))

Phylogenetic tree with 3 tips and 1 internal nodes.

Tip labels:
[1] "Blastophaga_nipponica_ott939325" "Blastophaga_psenes_ott357968"   
[3] "Blastophaga_quadrupes_ott867416"
Node labels:
[1] "Blastophaga_ott462102"

Unrooted; no branch lengths.

Similar to previous result.

However:

> rotl::tol_induced_subtree(ott_ids = c(357968, 867416, 939325, 462102))
Error: HTTP failure: 500
The node Node[1846303] does not seem to be in the draft tree.

@josephwb Is this expected behavior? I was hoping that asking for subtree /w missing ott id would create subtree and perhaps indicate that some ott id was ignored because it wasn't in the draft tree.

from rotl.

josephwb avatar josephwb commented on August 28, 2024

@jhpoelen No, this is not expected behaviour. A subtree should be returned, together with warnings if ids were 1) not in the synthetic tree or 2) altogether invalid ids. e.g. [edited, as there was a paste error in the curl call]:

curl -X POST http://api.opentreeoflife.org/v2/tree_of_life/induced_subtree -H "content-type:application/json" -d '{"ott_ids":[357968, 867416, 939325, 9999999]}'
{
  "subtree" : "(Blastophaga_nipponica_ott939325,Blastophaga_psenes_ott357968,Blastophaga_quadrupes_ott867416)Blastophaga_ott462102;",
  "ott_ids_not_in_tree" : [ ],
  "ott_ids_not_in_graph" : [ 9999999 ],
  "node_ids_not_in_graph" : [ ],
  "node_ids_not_in_tree" : [ ]
}

I believe what you are getting stems from an ongoing issue where one query node is the ancestor of another (can you confirm this? I can check, of course, but you probably know).

Anyway, definitely not an rOTL issue.

from rotl.

jhpoelen avatar jhpoelen commented on August 28, 2024

@josephwb from earlier example in this thread, the first three ott ids are tips (i.e. 357968, 867416, 939325) and the last one is a node (i.e. 462102) and wasp genus Blastophaga . Hope this helps.

from rotl.

josephwb avatar josephwb commented on August 28, 2024

Ok, thanks. I have fixed this bug (not yet deployed), but am working on fixing another.

from rotl.

fmichonneau avatar fmichonneau commented on August 28, 2024

hi @josephwb

Did your fix get deployed? This still seems to fail on the OTL side (i.e., no subtree is being returned).

curl -X POST http://devapi.opentreeoflife.org/v2/tree_of_life/induced_subtree -H "Content-Type:application/json" -d '{"ott_ids":[357968,867416,939325,462102]}'
{
  "message" : "The node Node[1992344] does not seem to be in the draft tree.",
  "exception" : "UnsupportedOperationException",
  "fullname" : "java.lang.UnsupportedOperationException",
  "stacktrace" : [ "opentree.GraphExplorer.getTreeTipRootPathMap(GraphExplorer.java:326)", "opentree.GraphExplorer.extractDraftSubtreeForTipNodes(GraphExplorer.java:530)", "opentree.plugins.tree_of_life.induced_subtree(tree_of_life.java:333)", "java.lang.reflect.Method.invoke(Method.java:497)", "org.neo4j.server.plugins.PluginMethod.invoke(PluginMethod.java:57)", "org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:168)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:300)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:122)", "java.lang.reflect.Method.invoke(Method.java:497)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)" ]
}

from rotl.

josephwb avatar josephwb commented on August 28, 2024

This works.

from rotl.

jhpoelen avatar jhpoelen commented on August 28, 2024

from rotl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.