Giter Site home page Giter Site logo

incatools / dosdp-tools Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 5.0 544 KB

Utility for working with DOSDP design patterns and OWL ontologies

License: MIT License

Scala 100.00%
design-patterns dosdp-pattern monarchinitiative obofoundry odp ontology owl

dosdp-tools's People

Contributors

balhoff avatar cmungall avatar hkir-dev avatar jdr0887 avatar rohmk avatar scala-steward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dosdp-tools's Issues

Handle unquoted labels better

In some cases, the value for a field needs to be an ontology term. Since the value could be an arbitrary class expression, the simplest form for a name with spaces in it requires extra quoting: "'biological process'". We should see if this can be made less confusing for authors.

way to set the ontology name for the generate command

I was wondering if there is a way to configure the ontology name when running the generate command, instead of having something generic like Prefix(:=urn:unnamed:ontology#ont1#)

if not, that would be great to have this option

Add options to write logical axioms only or annotation axioms only

As booleans:

--logical-axioms-only
--annotation-axioms-only

hmmm - but what if they choose both?

Alternatively one option taking an arg:

--restrict_axioms_to=logical/annotation

note - in case of annotations on logical axioms, these should still be written when logical axioms option is chosen

Order columns such that defined IRI is always first

minor annoyance, compare the ordering of

https://build.berkeleybop.org/job/query-pheno-patterns/lastSuccessfulBuild/artifact/upheno/src/patterns/abnormal.hp.tsv/*view*/

vs

https://build.berkeleybop.org/job/query-pheno-patterns/lastSuccessfulBuild/artifact/upheno/src/patterns/missingProcess.hp.tsv/*view*/

Also, we have been using a constant value for c1/2, iri, iri-label in our manually constructed csvs. Maybe definedClass, definedClass label would be better.

Conditional filtering in dosdps

Hi Jim (cc @dosumis @mikebada),

I have two related questions, maybe only one of them needs answering:

  1. Is it possible to have conditional if-else style logic in a dosdp so dosdp-tools can only select certain classes based on specified variables? I'd like to know in any case, but probably the better approach is:

  2. How can I write a pattern that will filter based on the presence or absence of a property, for either generate or query? For example, how does one query (or generate using an input ontology to filter out entities in the tsv that don't meet the pattern criteria) for the presence of the annotation property owl:deprecated, in order to return a list of all deprecated classes? How does one do the inverse, select all classes that don't have the deprecation annotation to get a list of all currently valid classes?

I'm not sure if this question should be here or should be on the actual dosdp repo; if you think it belongs better there I'll move it over. Thank you again for your help. We are making good strides towards a fully refactored SO-MSO that will be thanks to dosdp and dosdp-tools.

missing dependency

I know I should probably use Docker...
After building from source, I was getting this error message:
java.lang.NoClassDefFoundError: Unable to load class groovy.xml.jaxb.JaxbGroovyMethods due to missing dependency javax/xml/bind/Unmarshaller

I solved the problem by adding to the dependency list (thanks google !):
"javax.xml.bind" % "jaxb-api" % "2.3.0",

Bug with xrefs implementation

dosdp-scala generate --obo-prefixes=true --template=design_patterns/validated_patterns/activator_activity.yaml --infile=pattern_implementation_tsv/activator_activity.tsv --outfile=activator_activity.ofn --ontology=../go-simple.obo

activator_activity.yaml

activator_activity.tsv

BUG: def_dbxrefs end up like this:

GOC:BHF,GOC:dph,GOC:tb

image

Looks like string gets cast to a uniq'd list of characters.

use defined_class label if it exists

Would it be possible that dosdp-tools does not overwrite the defined class label if the defined_class label is not empty in the tsv file.
The label could be created using the yaml file only if that colum is empty

Bug when using the release 0.3.3

I got this error message when running the dosdp-tools command:
Could not find or load main class org.monarchinitiative.dosdp.cli.Main

Alternate reasoners?

@mikebada

Are there any plans to include other reasoners soon? I am working with an ontology that elk has trouble with in protege, but which FaCT++ reasons over just fine. I haven't looked at the source code yet, but is the choice of reasoner modular in dosdp-tools current state? Would I be able to redirect dosdp-tools to a different reasoner on the system and add an extra argument to include it on the command line?

Thank you for any help or suggestions!

Lexical operations

Parse Label to OWL def

Given a string literal, and a literal-generating DP, test to see if the string parses using the DP, and if so, generate the tuples (or the OWL def, or the full class)

Return also some kind of structured evidence - e.g. if uses a 'related' uberon synonym with xref FOO:123, include this (this is useful for weighting candidate derived axiom)

Propose lexical generator rule

Given:

  • string literal
  • DP name
  • tuple

(or replace the last 2 with an OWL def, which can be used to derived DP+tuple)

Make a proposed lexical generating rule.

E.g. ("abnormal limb morphology", abnormal_morphology, UBERON:999) ==> 'abnormal %s morphology', structure

Propose label in referenced class

Given

  • DP, with lexical generator rule
  • tuple with slots S1...Sn (slots for the defined class)
  • label for the defined class

propose a label for a class S_i, such that this is a new label/syn, and the lexical generator rule for the defined class can use this to generate the defined class label.

E.g. "abnormal hand morphology", has one slot, filled with uberon class 'manus'. Suggest new uberon synonym 'hand'

Learning

TODO: make this a distinct ticket. With the above, we can learn new DPs and use to generate missing parts of ontologies

Bug - or improvements to exception handling needed for building prototypes owl

When building prototypes from here:

https://github.com/obophenotype/Pheno_odk_test/tree/master/src/patterns

dosdp-tools prototype --obo-prefixes --template=. --outfile=../patterns/pattern.owl

=>

Exception in thread "main" java.net.MalformedURLException: no protocol: . at java.net.URL.<init>(URL.java:593) at java.net.URL.<init>(URL.java:490) at java.net.URL.<init>(URL.java:439) at scala.io.Source$.fromURL(Source.scala:131) at scala.io.Source$.fromURL(Source.scala:126) at org.monarchinitiative.dosdp.cli.Common.inputDOSDPFrom(Common.scala:50) at org.monarchinitiative.dosdp.cli.Common.inputDOSDPFrom$(Common.scala:47) at org.monarchinitiative.dosdp.cli.Prototype$.inputDOSDPFrom(Prototype.scala:14) at org.monarchinitiative.dosdp.cli.Prototype$.$anonfun$run$5(Prototype.scala:27) at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234) at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320) at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976) at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976) at scala.collection.TraversableLike.map(TraversableLike.scala:234) at scala.collection.TraversableLike.map$(TraversableLike.scala:227) at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47) at scala.collection.SetLike.map(SetLike.scala:101) at scala.collection.SetLike.map$(SetLike.scala:101) at scala.collection.AbstractSet.map(Set.scala:47) at org.monarchinitiative.dosdp.cli.Prototype$.run(Prototype.scala:27) at org.monarchinitiative.dosdp.cli.Main$.$anonfun$new$1(Main.scala:33) at org.monarchinitiative.dosdp.cli.Main$.$anonfun$new$1$adapted(Main.scala:33) at scala.Option.foreach(Option.scala:257) at org.monarchinitiative.dosdp.cli.Main$.delayedEndpoint$org$monarchinitiative$dosdp$cli$Main$1(Main.scala:33) at org.monarchinitiative.dosdp.cli.Main$delayedInit$body.apply(Main.scala:29) at scala.Function0.apply$mcV$sp(Function0.scala:34) at scala.Function0.apply$mcV$sp$(Function0.scala:34) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) at scala.App.$anonfun$main$1$adapted(App.scala:76) at scala.collection.immutable.List.foreach(List.scala:389) at scala.App.main(App.scala:76) at scala.App.main$(App.scala:74) at org.monarchinitiative.dosdp.cli.Main$.main(Main.scala:29) at org.monarchinitiative.dosdp.cli.Main.main(Main.scala)

The '.' in the java.net.MalformedURLException seems to refer to the path to templates directory as I get '../patterns' in its place if running from src/ontology/Makefile.

The same command works when running via the Makefile on (or directly on a target) from the ontology_development_kit. The latter has only a single YAML file in src/patterns, so I assume the problem is due to one of the YAML files in Pheno_odk_test/tree/master/src/patterns but haven't (yet) tracked down which. If so, it would be great if the command could tell me which one (and what's wrong with it).

Finding no value via readable_identifiers should probably cause a failure

If the ontology passed in doesn't have an annotation axiom that can provide a readable identifier with which to construct a label (for example), dosdp-tools can:

  1. Default to IRI text (current behavior).
  2. Default to IRI text and log a warning (at the very least should move to this).
  3. Throw an error and abort (would help prevent bad pipelines).

@dosumis and @cmungall thoughts?

Errors in translation to SPARQL

From the GO DP repo work (geneontology/go-ontology#13472):

$ make validated_patterns/import_across_membrane.tsv
dosdp-tools --prefixes=prefixes.yaml --ontology=../ontology/go-edit.obo --reasoner=elk --obo-prefixes=true --template=validated_patterns/import_across_membrane.yaml --outfile=validated_patterns/import_across_membrane.tsv query
15:35:55.403 [main] DEBUG Jena - Jena initialization
15:35:55.528 [main] DEBUG org.apache.jena.util.FileManager - Add location: LocatorFile
15:35:55.528 [main] DEBUG org.apache.jena.util.FileManager - Add location: ClassLoaderLocator
15:35:55.530 [main] DEBUG org.apache.jena.util.LocationMapper - Failed to find configuration: file:location-mapping.rdf;file:location-mapping.n3;file:location-mapping.ttl;file:etc/location-mapping.rdf;file:etc/location-mapping.n3;file:etc/location-mapping.ttl
15:35:55.530 [main] DEBUG org.apache.jena.util.FileManager - Add location: LocatorFile
15:35:55.530 [main] DEBUG org.apache.jena.util.FileManager - Add location: LocatorURL
15:35:55.530 [main] DEBUG org.apache.jena.util.FileManager - Add location: ClassLoaderLocator
15:35:55.535 [main] DEBUG org.apache.jena.riot.system.stream.JenaIOEnvironment - Failed to find configuration: location-mapping.ttl;location-mapping.rdf;location-mapping.n3;etc/location-mapping.rdf;etc/location-mapping.n3;etc/location-mapping.ttl
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.jena.rdf.model.impl.ResourceImpl.fresh(ResourceImpl.java:135)
        at org.apache.jena.rdf.model.impl.ResourceImpl.<init>(ResourceImpl.java:85)
        at org.apache.jena.rdf.model.ResourceFactory$Impl.createResource(ResourceFactory.java:297)
        at org.apache.jena.rdf.model.ResourceFactory.createResource(ResourceFactory.java:92)
        at org.apache.jena.vocabulary.RDFS.resource(RDFS.java:35)
        at org.apache.jena.vocabulary.RDFS.<clinit>(RDFS.java:40)
        at org.apache.jena.vocabulary.RDFS$Nodes.<clinit>(RDFS.java:66)
        at org.phenoscape.owlet.Owlet$.<init>(Owlet.scala:171)
        at org.phenoscape.owlet.Owlet$.<clinit>(Owlet.scala)
        at org.phenoscape.owlet.OwletManchesterSyntaxDataType$SerializableClassExpression$.asOMN$extension(OwletManchesterSyntaxDataType.scala:33)
        at org.monarchinitiative.dosdp.SPARQL$$anonfun$3.apply(SPARQL.scala:63)
        at org.monarchinitiative.dosdp.SPARQL$$anonfun$3.apply(SPARQL.scala:60)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
        at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
        at scala.collection.AbstractTraversable.flatMap(Traversable.scala:104)
        at org.monarchinitiative.dosdp.SPARQL$.triplesFor(SPARQL.scala:60)
        at org.monarchinitiative.dosdp.SPARQL$.queryFor(SPARQL.scala:33)
        at org.monarchinitiative.dosdp.cli.Query$.run(Query.scala:36)
        at org.monarchinitiative.dosdp.cli.Main$$anonfun$1.apply(Main.scala:30)
        at org.monarchinitiative.dosdp.cli.Main$$anonfun$1.apply(Main.scala:30)
        at scala.Option.foreach(Option.scala:257)
        at org.monarchinitiative.dosdp.cli.Main$.delayedEndpoint$org$monarchinitiative$dosdp$cli$Main$1(Main.scala:30)
        at org.monarchinitiative.dosdp.cli.Main$delayedInit$body.apply(Main.scala:28)
        at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App$$anonfun$main$1.apply(App.scala:76)
        at scala.App$$anonfun$main$1.apply(App.scala:76)
        at scala.collection.immutable.List.foreach(List.scala:381)
        at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
        at scala.App$class.main(App.scala:76)
        at org.monarchinitiative.dosdp.cli.Main$.main(Main.scala:28)
        at org.monarchinitiative.dosdp.cli.Main.main(Main.scala)
Caused by: java.lang.NullPointerException
        at org.apache.jena.rdf.model.impl.ModelCom.add(ModelCom.java:1191)
        at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.implementWith(AssemblerGroup.java:92)
        at org.apache.jena.assembler.ConstAssembler.general(ConstAssembler.java:137)
        at org.apache.jena.sparql.core.assembler.AssemblerUtils.registerDataset(AssemblerUtils.java:68)
        at org.apache.jena.sparql.core.assembler.AssemblerUtils.init(AssemblerUtils.java:60)
        at org.apache.jena.query.ARQ.init(ARQ.java:590)
        at org.apache.jena.sparql.system.InitARQ.start(InitARQ.java:29)
        at org.apache.jena.system.JenaSystem.lambda$init$50(JenaSystem.java:119)
        at java.util.ArrayList.forEach(ArrayList.java:1249)
        at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:194)
        at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:171)
        at org.apache.jena.system.JenaSystem.init(JenaSystem.java:117)
        at org.apache.jena.graph.NodeFactory.<clinit>(NodeFactory.java:32)
        ... 35 more
make: *** [validated_patterns/import_across_membrane.yaml] Error 1

dosdp query does not work with 'Thing'

dosdp-tools generate works with this pattern but dosdp-tools query does not because of the use of "Thing" in the variable part.

The error I got:
Exception in thread "main" org.semanticweb.owlapi.manchestersyntax.renderer.ParserException: Encountered Thing at line 1 column 1.

Having issues querying ecto

(excuse brevity)

I tried the exposure_to_radiation.yaml pattern from ecto.

The pattern has a slash in its name, which makes its way into variables, so I hand removed these

I also removed the subClassOf* constraint, since this uses axioms in an import chain (trivial to merge I know...)

I also tried removing the filter, giving:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT ?radiation_exposure ?stressor
WHERE {
?radiation_exposure owl:equivalentClass ?8a2a063ecf4a4fc1919395b5076b01e9 .
?8a2a063ecf4a4fc1919395b5076b01e9 owl:intersectionOf/rdf:rest*/rdf:first <http://purl.obolibrary.org/obo/ExO:0000002> .
?8a2a063ecf4a4fc1919395b5076b01e9 owl:intersectionOf/rdf:rest*/rdf:first ?4fa6da64b15e4932ba8450b6a847034b .
?8a2a063ecf4a4fc1919395b5076b01e9 owl:intersectionOf/rdf:rest/rdf:rest rdf:nil .
?4fa6da64b15e4932ba8450b6a847034b owl:onProperty <http://purl.obolibrary.org/obo/RO:0002233> .
?4fa6da64b15e4932ba8450b6a847034b owl:someValuesFrom ?stressor .
}

no luck:

$ arq --query z.rq --data ecto.owl

---------------------------------
| radiation_exposure | stressor |
=================================
---------------------------------

.bat file error in Windows

For the prepackaged version 0.4.1, I'm getting the following error message from the shell when running the dosdp-tools.bat file:

"The input line is too long.
The syntax of the command is incorrect."

having issues

Nothing seems to be happening when I run the following command:
dosdp-scala --template=eq.yaml --print-query

This is my eq.yaml file:

pattern_name: to/eq
classes: []

relations:
part of: BFO_0000050
inheres in: RO_0000052

vars:
attribute: "'Thing'"
entity: "'Thing'"

name:
text: "%s %s"
vars:
- entity
- attribute

def:
text: "The %s of a %s."
vars:
- attribute
- entity

equivalentTo:
text: "%s and 'inheres in' some %s"
vars:
- attribute
- entity

I was able to print the query when I used the exposure_to_radiation.yaml file that Chris used.

I am obviously missing something here but I don't know what. Any clue?

In query mode, check against semantically equivalent rewrites of equivalence axioms

E.g. an ontology may have

  • A = B and R some C
  • B = D and S some E

the def for A can be rewritten/unfolded as

  • A = D and R some C and S some E

it may be the case that only this latter form will match against a particular patterns that expects two slots (e.g. fixed D, R, S and slots for C and E). In some cases the reverse may be the useful one. It is valid to attempt all possible combinations. This should remain in some kind of subset of DL (there is an infinite number of equivalent DL expressions, but I believe the number of EL++ equivalents is bounded and sensible)

This kind of folding/unfolding may be generally useful elsewhere. For example an ontology author may want to rewrite equivalence axioms to conform to the canonical style of the DPs.

There is some code in owltools but it would be better rewritten in scala

prolog too...
https://blipkit.wordpress.com/2012/01/14/unfolding-t-boxes-in-go-using-popl/

Can I bulk add object properties using dosdp-tools to all classes in an existing ontology?

Hi Jim,

I'd like to know if and how I can use dosdp-tools to add an object property to every class in an ontology.

It's something I know I can do in the OWLAPI, but I'd like to know how to do it in dosdp-tools since it is much less verbose.

The ontology I'm working on, the Sequence Ontology (SO), consists mostly of "generically dependent continuants" that "generically depend on" some independent continuant. These independent continuants, sequence molecules as physical entities, are the content of an accompanying ontology, the Molecular Sequence Ontology (MSO).

First I will direct import the MSO into a working file of the SO. I then want to add to every SO class an object property (subclass assertion) of the following format:

genericallyDependsOn some MSOClass

Assuming I have a TSV file which contains in each row an SO class IRI in the first column and the corresponding MSO Class IRI to fill the property in the second column, how would I structure the dosdp template to use with dosdp-tools to accomplish my task?

Thank you!

New command: Generate markdown docs

DPs are vital not just for automated procedures on an ontology, but also for documentation too. It's important for documentation to be easily browsed and to look intuitive to semi-technical readers.

@dosumis already implemented a dosdp->md translation in jython, predating dosdp-tools:

https://github.com/dosumis/dead_simple_owl_design_patterns/blob/master/src/attic/pattern.py#L207

example: https://github.com/dosumis/dead_simple_owl_design_patterns/blob/master/patterns/integral_membrane_component.md

Having this reimplemented in scala would make it easier to have everything working as one package, but if this is a lot of work may be better to reuse?

Some things that would also be nice to have:

  • ability to embed markdown directly within the yaml doc for enhanced human-friendly docs (we could invert this and use yamldown, see the obo md files for examples, but this would probably be too much churn)
  • ability to include examples (and counterexamples?) within a DP. This would also be good for unit tests
  • linking to PURLs for all declared classes and relations
  • self-reporting the PURL for the pattern itself (e.g. $OBO/$ONTID/patterns/$NAME)
  • links to subsuming or subsumed patterns, or patterns that use the same vars

documentation servers

Although probably out of scope for dosdp-tools, but providing for context:

although github can render markdown docs just fine, it would be nice to have the html more directly. We could have a documentation server, but it may be better to go a static site route.

many ontologies like uberon have static sites built using Jekyll (GO may go this way). obofoundry.org also uses this. Markdown is rendered by default. It should be relatively easy to write liquid templates that would list all DPs for an ontology. For example this list is made automatically for a yaml config.

This may still be a lot of work for some ontologies that do not have static sites. They should have the option of generating markdown and depositing it in github and linking directly to this (one awkwardness is that PURLs for the patterns will not have the .md suffix). This is fine, but we may also want to consider registering patterns with OBO central (in the usual way, adding to the md file for each ontology) and having the OBO central jekyll framework render all known patterns (cc @jamesaoverton)

Make vars optional in 'printf' fields?

Patterns sometimes need to spec a constant filler for an axiom. e.g. patterns in GO require a namespace to be specified for all implementations of the patterns. We can also imagine cases where we want to spec a constant SubClassOf axiom (=> consistent GCI) - although this may be a slightly dangerous approach.

In the current spec we could support this by forcing spec of an empty vars list in a pattern. But a more compact solution is simply to allow the vars field to be optional.

=>

namespace:
   text: biological_process

While dropping the text field altogether would look cleaner in this case, this is harder to build on top of the core spec, where we still need an annotationProperty field:

annotations:
   -
       annotationProperty: obo_namespace
       text: biological_process

Error messages can be obscure

E.g.
https://build.berkeleybop.org/job/query-go-patterns/10/console

17:21:19.363 [main] DEBUG org.semanticweb.owlapi.rdf.rdfxml.parser.TripleLogger - Loaded OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/go.owl>) VersionIRI(<null>))
log4j:WARN No appenders could be found for logger (org.semanticweb.elk.config.ConfigurationFactory).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.apache.jena.query.QueryParseException: Line 15, column 121: Unresolved prefixed name: http:
	at org.apache.jena.sparql.lang.ParserBase.throwParseException(ParserBase.java:521)
	at org.apache.jena.sparql.lang.ParserBase.resolvePName(ParserBase.java:286)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.PrefixedName(SPARQLParser11.java:4861)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.iri(SPARQLParser11.java:4841)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.RDFLiteral(SPARQLParser11.java:4673)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.GraphTerm(SPARQLParser11.java:3367)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.VarOrTerm(SPARQLParser11.java:3277)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.GraphNodePath(SPARQLParser11.java:3233)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.ObjectPath(SPARQLParser11.java:2749)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.ObjectListPath(SPARQLParser11.java:2730)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.PropertyListPathNotEmpty(SPARQLParser11.java:2663)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.TriplesSameSubjectPath(SPARQLParser11.java:2607)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.TriplesBlock(SPARQLParser11.java:1792)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.GroupGraphPatternSub(SPARQLParser11.java:1775)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.GroupGraphPattern(SPARQLParser11.java:1675)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.WhereClause(SPARQLParser11.java:431)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.SelectQuery(SPARQLParser11.java:124)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.Query(SPARQLParser11.java:29)
	at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.QueryUnit(SPARQLParser11.java:20)
	at org.apache.jena.sparql.lang.ParserSPARQL11$1.exec(ParserSPARQL11.java:48)
	at org.apache.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:96)
	at org.apache.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:52)
	at org.apache.jena.sparql.lang.SPARQLParser.parse(SPARQLParser.java:34)
	at org.apache.jena.query.QueryFactory.parse(QueryFactory.java:147)
	at org.apache.jena.query.QueryFactory.create(QueryFactory.java:79)
	at org.apache.jena.query.QueryFactory.create(QueryFactory.java:52)
	at org.apache.jena.query.QueryFactory.create(QueryFactory.java:40)
	at org.phenoscape.owlet.Owlet.expandQueryString(Owlet.scala:56)
	at org.monarchinitiative.dosdp.cli.Query$.run(Query.scala:42)
	at org.monarchinitiative.dosdp.cli.Main$$anonfun$1.apply(Main.scala:32)
	at org.monarchinitiative.dosdp.cli.Main$$anonfun$1.apply(Main.scala:32)
	at scala.Option.foreach(Option.scala:257)
	at org.monarchinitiative.dosdp.cli.Main$.delayedEndpoint$org$monarchinitiative$dosdp$cli$Main$1(Main.scala:32)
	at org.monarchinitiative.dosdp.cli.Main$delayedInit$body.apply(Main.scala:29)
	at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
	at scala.App$$anonfun$main$1.apply(App.scala:76)
	at scala.App$$anonfun$main$1.apply(App.scala:76)
	at scala.collection.immutable.List.foreach(List.scala:381)
	at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
	at scala.App$class.main(App.scala:76)
	at org.monarchinitiative.dosdp.cli.Main$.main(Main.scala:29)
	at org.monarchinitiative.dosdp.cli.Main.main(Main.scala)
Makefile:31: recipe for target 'anchored_membrane_component.tsv' failed

DecodingFailure(String, List(DownField(xrefs), DownField(def)))

getting this when I try and make the tsv from https://github.com/geneontology/go-ontology/blob/master/src/design_patterns/cc_transport_from_to.yaml

owltools --catalog-xml ../ontology/catalog-v001.xml ../ontology/go-edit.obo --merge-imports-closure -o go-edit-merged.ttl.tmp && mv go-edit-merged.ttl.tmp go-edit-merged.ttl
dosdp-tools --prefixes=prefixes.yaml --ontology=go-edit-merged.ttl --reasoner=elk --obo-prefixes=true --template=cc_transport_from_to.yaml --outfile=cc_transport_from_to.tsv.tmp query && ./util/fix-tsvs.pl cc_transport_from_to.tsv.tmp > cc_transport_from_to.tsv
09:29:49.895 [main] DEBUG Jena - Jena initialization
09:29:50.087 [main] DEBUG org.apache.jena.util.FileManager - Add location: LocatorFile
09:29:50.088 [main] DEBUG org.apache.jena.util.FileManager - Add location: ClassLoaderLocator
09:29:50.090 [main] DEBUG org.apache.jena.util.LocationMapper - Failed to find configuration: file:location-mapping.rdf;file:location-mapping.n3;file:location-mapping.ttl;file:etc/location-mapping.rdf;file:etc/location-mapping.n3;file:etc/location-mapping.ttl
09:29:50.090 [main] DEBUG org.apache.jena.util.FileManager - Add location: LocatorFile
09:29:50.090 [main] DEBUG org.apache.jena.util.FileManager - Add location: LocatorURL
09:29:50.090 [main] DEBUG org.apache.jena.util.FileManager - Add location: ClassLoaderLocator
09:29:50.096 [main] DEBUG org.apache.jena.riot.system.stream.JenaIOEnvironment - Failed to find configuration: location-mapping.ttl;location-mapping.rdf;location-mapping.n3;etc/location-mapping.rdf;etc/location-mapping.n3;etc/location-mapping.ttl
09:29:50.447 [main] DEBUG org.apache.jena.info - System architecture: 64 bit
09:29:51.627 [main] ERROR org.monarchinitiative.dosdp.cli.Query$ - Failed to parse pattern:
String: DownField(xrefs),DownField(def)
Exception in thread "main" DecodingFailure(String, List(DownField(xrefs), DownField(def)))
make: *** [cc_transport_from_to.tsv] Error 1

Odd intepretation of 'logical axioms'

When I run this pattern with this tsv I get a very odd looking ontology:

image

The DOSDP passes basic checking with python and the build with DOSDP tools doesn't emit any errors.

I expected that each class should have all of the specified subClassOf axioms.

In addition - something odd has happened to the annotation axioms. They are rolled, but I can't see them on the terms in Protege. Here's an example in functional syntax from the OWL file rolled:

AnnotationAssertion(rdfs:label http://purl.obolibrary.org/obo/FBbt_00015072 "centrolateral neuropil of larval abdominal segment 7"^^xsd:string)
AnnotationAssertion(Annotation(http://www.geneontology.org/formats/oboInOwl#hasDbXref "['PMID:28730682']"^^xsd:string) http://purl.obolibrary.org/obo/IAO_0000115 http://purl.obolibrary.org/obo/FBbt_00015073 "A synaptic neuropil subdomain at the intersection of centromedial subdivision of ventral nerve cord and the larval abdominal segment 7."
"^^xsd:string)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.