Skip to content

Commit

Permalink
implements pattern for retrieving canonical identifiers in gpad output
Browse files Browse the repository at this point in the history
This work is in reference to geneontology/pathways2GO#71

This allows entity ontologies aside from neo to be used to construct go-cams while maintaining GPAD outputs that adhere strictly to canonical terminologies such as UniProt for human genes.  It works by adding the annotation property  http://geneontology.org/lego/canonical_record to link new terms (e.g. reactome entities) to canonical terms (e.g. corresponding uniprots).  When these annotations are present, the GPAD SPARQL export process begins by converting the model to one with all of the external types replaced by canonical types.  The rest of the gpad export process is then unchanged.
  • Loading branch information
goodb committed Sep 27, 2019
1 parent 63babe7 commit 86e3bd2
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ else if (opts.nextEq("--ontology")) {
BlazegraphMolecularModelManager<Void> m3 = new BlazegraphMolecularModelManager<>(ontology, curieHandler, modelIdPrefix, inputDB, null);
for (IRI modelIRI : m3.getAvailableModelIds()) {
try {
String gpad = new GPADSPARQLExport(curieHandler, m3.getLegacyRelationShorthandIndex(), m3.getTboxShorthandIndex(), m3.getDoNotAnnotateSubset()).exportGPAD(m3.createInferredModel(modelIRI));
String gpad = new GPADSPARQLExport(curieHandler, m3.getLegacyRelationShorthandIndex(), m3.getTboxShorthandIndex(), m3.getDoNotAnnotateSubset()).exportGPAD(m3.createCanonicalInferredModel(modelIRI));
String fileName = StringUtils.replaceOnce(modelIRI.toString(), modelIdPrefix, "") + ".gpad";
Writer writer = new OutputStreamWriter(new FileOutputStream(Paths.get(gpadOutputFolder, fileName).toFile()), StandardCharsets.UTF_8);
writer.write(gpad);
Expand Down
Loading

0 comments on commit 86e3bd2

Please sign in to comment.