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

Fix test to use correct root type for complexes. #459

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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