Menu

#5 OntologyManager Stack Overflow - only for local ontologies

open
nobody
None
8
2009-10-28
2009-10-28
No

First of all, there is a test case, OlsOntologyTest, specially for SO, in the OntologyManager module
that has no problem when configured to use OLS. However, there is no similar test
for the local SO file case (that case the pain).

So, I can confirm that if you copy the same test case to the LocalOntologyTest.java

@Test
public void getValidTerms_so() throws OntologyLoaderException {
final OntologyAccess mod = manager.getOntologyAccess( "SO" );
// GO:0055044 has 7 children (OLS 17 July 2008) = 7 valid terms
OntologyTermI parent = mod.getTermForAccession("SO:0000001");
Set<OntologyTermI> terms = mod.getAllChildren(parent);
Assert.assertEquals( 1236, terms.size() );
}

, and add the SO configuration to the test/resources/local-ontologies.xml as
<cvSource source="psidev.psi.tools.ontology_manager.impl.local.LocalOntology"
uri="classpath:so.obo"
format="OBO"
name="Sequence Ontology"
identifier="SO"
version=""/>

, and also replace all the occurrences of 'replaced_by GO:XXXXX' to 'comment: GO:XXXX' in the so.obo
(otherwise the OboLoader fails to read it, but this is another story.... );
run JUnit tests, and you'll see that the only (that one) test fails due to the StackOverflowError

This bug can be reproduced with SO (so.obo) ontology.
But it does not mean that SO is a cause (be careful); even if it's true,
ideally, there should not be any exceptions thrown...

Patches for the test case that illuminates the error are attached.

Discussion

  • Igor Rodchenkov

    Igor Rodchenkov - 2009-10-28
     
  • Igor Rodchenkov

    Igor Rodchenkov - 2009-10-28
    • priority: 5 --> 8