Skip to content

Commit

Permalink
Allow Reactome to share intermediate small mols for #308
Browse files Browse the repository at this point in the history
  • Loading branch information
dustine32 committed Mar 12, 2024
1 parent 8573a88 commit f3dbe9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ else if (entity instanceof Interaction){
input_id = UUID.randomUUID().toString();
}
String input_location = null;
if (small_mol_do_not_join_ids.contains(input_id) || input.getCellularLocation() == null || entityStrategy.equals(EntityStrategy.REACTO)) {
if (small_mol_do_not_join_ids.contains(input_id) || input.getCellularLocation() == null) {
// Gotta make these locations specific to rxn ID for do_not_join classes
input_location = entity_id;
} else {
Expand All @@ -1341,7 +1341,7 @@ else if (entity instanceof Interaction){
}
input_location = String.join("_", in_location_terms);
}
if(entityStrategy.equals(EntityStrategy.YeastCyc) && !small_mol_do_not_join_ids.contains(input_id)){
if(!small_mol_do_not_join_ids.contains(input_id)){
// Try to reuse previous rxn's output instance
for(PathwayStep previous_step : previous_steps) {
BiochemicalReaction reaction = getBiochemicalReaction(previous_step);
Expand Down Expand Up @@ -1379,7 +1379,7 @@ else if (entity instanceof Interaction){
output_id = UUID.randomUUID().toString();
}
String output_location = null;
if (small_mol_do_not_join_ids.contains(output_id) || output.getCellularLocation() == null || entityStrategy.equals(EntityStrategy.REACTO)) {
if (small_mol_do_not_join_ids.contains(output_id) || output.getCellularLocation() == null) {
// Gotta make these locations specific to rxn ID for do_not_join classes
output_location = entity_id;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1013,31 +1013,20 @@ public final void testInferRegulatesViaOutputEnables() {
System.out.println("Done testing regulates via output enables");
}

//gomodel:R-HSA-4641262/R-HSA-201677 / RO:0002413 / gomodel:R-HSA-4641262/R-HSA-201691
// #inferProvidesInput
/**
* Test method for {@link org.geneontology.gocam.exchange.GoCAM#inferProvidesInput}.
* Use pathway R-HSA-4641262 , reaction1 = R-HSA-201677 reaction2 = R-HSA-201691
* Relation should be RO:0002413 directly positive regulates
* Phosphorylation of LRP5/6 cytoplasmic domain by membrane-associated GSK3beta
* Phosphorylation of LRP5/6 cytoplasmic domain by CSNKI
* https://reactome.org/content/detail/R-HSA-4641262
* Compare to http://noctua-dev.berkeleybop.org/editor/graph/gomodel:R-HSA-4641262
*
* Also an active site detection test
*/
@Test
public final void testInferProvidesInput() {
public final void testSharedIntermediateInputs() {
System.out.println("Testing provides input");
TupleQueryResult result = null;
try {
// Check for shared input/output entity instance between rxns
result = blaze.runSparqlQuery(
"prefix obo: <http://purl.obolibrary.org/obo/> "
+ "select ?pathway " +
"where { " +
"VALUES ?reaction1 { <http://model.geneontology.org/R-HSA-201677> } . "+
"VALUES ?reaction2 { <http://model.geneontology.org/R-HSA-201691> } . "+
" ?reaction1 obo:RO_0002413 ?reaction2 . "
" ?reaction1 obo:RO_0002234 ?small_mol . " +
" ?reaction2 obo:RO_0002233 ?small_mol . "
+ "?reaction1 obo:BFO_0000050 ?pathway "+
"}");
int n = 0; String pathway = null;
Expand All @@ -1059,7 +1048,7 @@ public final void testInferProvidesInput() {
e.printStackTrace();
}
}
System.out.println("Done testing regulates via output enables");
System.out.println("Done testing sharing of intermediate small molecules");
}

@Test
Expand Down

0 comments on commit f3dbe9c

Please sign in to comment.