Skip to content

Commit

Permalink
Fix test to use correct root type for complexes. (#459)
Browse files Browse the repository at this point in the history
* Fix test to use correct root type for complexes.

* Fix lookup test for new protein complex classification.
  • Loading branch information
balhoff authored Feb 22, 2022
1 parent 8241a3a commit 592dca6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,26 +256,19 @@ public void testGetUpperTypes() throws IOException {
assertTrue("WBGene00000275 not subclass of CHEBI_24431 chemical entity", supers.contains("http://purl.obolibrary.org/obo/CHEBI_24431"));
}

@Test
@Test
public void testGetComplexPortalTypes() throws IOException {
//make sure its possible to get from leaf to root for the key classes
Set<String> uris = new HashSet<String>();
String cp1 = "http://purl.obolibrary.org/obo/ComplexPortal_CPX-9";
String cp2 = "http://purl.obolibrary.org/obo/ComplexPortal_CPX-4082";
//this doesn't work now. It should work while the ones above do not. this is problem with the neo ontology.
// String cp3 = "https://www.ebi.ac.uk/complexportal/complex/CPX-9";
String cp1 = "https://www.ebi.ac.uk/complexportal/complex/CPX-9";
String cp2 = "https://www.ebi.ac.uk/complexportal/complex/CPX-4082";
uris.add(cp1);
uris.add(cp2);
// uris.add(cp3);

Map<String, Set<String>> uri_roots = onto_repo.getSuperCategoryMap(uris);
Set<String> supers = uri_roots.get(cp1);
assertTrue("ComplexPortal_CPX-9 not an information biomacromolecule", supers.contains("http://purl.obolibrary.org/obo/CHEBI_33695"));
assertTrue("ComplexPortal_CPX-9 should be a protein-containing complex", supers.contains("http://purl.obolibrary.org/obo/GO_0032991"));
supers = uri_roots.get(cp2);
assertTrue("ComplexPortal_CPX-4082 not an information biomacromolecule", supers.contains("http://purl.obolibrary.org/obo/CHEBI_33695"));
// supers = uri_roots.get(cp3);
// assertTrue("ComplexPortal_CPX-9 as https://www.ebi.ac.uk/complexportal/complex/CPX-9 is not an information biomacromolecule", supers.contains("http://purl.obolibrary.org/obo/CHEBI_33695"));


assertTrue("ComplexPortal_CPX-4082 should be a protein-containing complex", supers.contains("http://purl.obolibrary.org/obo/GO_0032991"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ public void testLookupGeneProductCls() throws Exception {
assertTrue(e.isa_closure.size() >= 15);
assertTrue(e.isa_closure.contains("CHEBI:33695"));
//
// //example non-gene obo:ComplexPortal_CPX-900 http://purl.obolibrary.org/obo/ComplexPortal_CPX-900
// //example non-gene obo:ComplexPortal_CPX-900 https://www.ebi.ac.uk/complexportal/complex/CPX-900
gp_iri = handler.getIRI("ComplexPortal:CPX-900");
lookup = s.lookup(gp_iri);
assertEquals(1, lookup.size());
e = lookup.get(0);
assertEquals("saga-kat2a_human Hsap", e.label);
assertEquals(16, e.isa_closure.size());
assertTrue(e.isa_closure.contains("CHEBI:33695"));
assertEquals(7, e.isa_closure.size());
assertTrue(e.isa_closure.contains("GO:0032991"));
}

@Test
Expand Down

0 comments on commit 592dca6

Please sign in to comment.