Skip to content

DO NOT MERGE YET: Upgrade to solr6: DO NOT MERGE YET #195

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM maven:alpine

RUN mkdir /app
WORKDIR /app

# this trick doesn't seem to work for multi-project repos
#ADD pom.xml /app
#RUN ["/usr/local/bin/mvn-entrypoint.sh", "mvn", "verify", "clean", "--fail-never"]

ADD OWLTools-Parent/pom.xml /app/OWLTools-Parent/
WORKDIR /app/OWLTools-Parent
RUN ["/usr/local/bin/mvn-entrypoint.sh", "mvn", "verify", "clean", "--fail-never"]
WORKDIR /app

ADD . /app
WORKDIR /app/OWLTools-Parent
RUN mvn -DskipTests clean install && cp ../OWLTools-Runner/target/owltools ../OWLTools-Runner/bin/
ENV PATH="$PATH:/app/OWLTools-Runner/bin/"

CMD owltools -h
Original file line number Diff line number Diff line change
Expand Up @@ -380,32 +380,20 @@ protected Map<String, String> createDefaultAspectMap(OWLGraphWrapper graph) {

OWLClass mf = graph.getOWLClassByIdentifier("GO:0003674"); // molecular_function
if (mf != null) {
String mfKey = getGoSubOntology(mf, graph);
if (mfKey == null)
throw new RuntimeException("Could not retrieve sub-ontology for GO:0003674 (molecular_function). The value of the OBO-namespace tag does not exist.");

map.put(mfKey, "F");
map.put(getGoSubOntology(mf, graph), "F");
}

OWLClass bp = graph.getOWLClassByIdentifier("GO:0008150"); // biological_process
if (bp != null) {
String bpKey = getGoSubOntology(bp, graph);
if (bpKey == null)
throw new RuntimeException("Could not retrieve sub-ontology for GO:0008150 (biological_process). The value of the OBO-namespace tag does not exist.");

map.put(bpKey, "P");
map.put(getGoSubOntology(bp, graph), "P");
}

OWLClass cc = graph.getOWLClassByIdentifier("GO:0005575"); // cellular_component
if (cc != null) {
String ccKey = getGoSubOntology(cc, graph);
if (ccKey == null)
throw new RuntimeException("Could not retrieve sub-ontology for GO:0005575 (celluar_component). The value of the OBO-namespace tag does not exist.");

map.put(ccKey, "C");
map.put(getGoSubOntology(cc, graph), "C");
}

if (map.isEmpty() || map.containsKey(null)) {
if (map.isEmpty()) {
// only fail if there are mappings
// the test case uses a custom ontology, which has no cc branch
throw new RuntimeException("Could not create any valid aspect mappings. Is the correct ontology (GO) loaded?");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private ReadState loadNext() throws IOException{
return ReadState.next;
}else{
fireParsingWarning(error);
LOG.info(error + " : " + this.currentRow);
LOG.warn(error + " : " + this.currentRow);
}
}
return ReadState.success;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
! NOT a valid submission file!!!!!!
!
MGI MGI:1918918 0610007C21Rik GO:0016021 MGI:MGI:1354194 IEA SP_KW:KW-0812 C RIKEN cDNA 0610007C21 gene HSPC013|p18 protein taxon:10090 20101003 UniProtKB VEGA:OTTMUSP00000025430
MGI MGI:1918919 0610007C21Rik GO:0016021 MGI:MGI:1354194 IEA SP_KW:KW-0812 C RIKEN cDNA 0610007C21 gene HSPC013|p18 protein taxon:10090 20991003 UniProtKB VEGA:OTTMUSP00000025430
MGI MGI:1918919 0610007C21Rik GO:0016021 MGI:MGI:1354194 IEA SP_KW:KW-0812 C RIKEN cDNA 0610007C21 gene HSPC013|p18 protein taxon:10090 20161003 UniProtKB VEGA:OTTMUSP00000025430
Original file line number Diff line number Diff line change
Expand Up @@ -238,45 +238,6 @@ else if (result.size() == 1) {
return result;
}

/**
* Append annotations to an existing axiom
*
* @param axiom
* @param annotations
* @param ontology
* @return
*/
public static OWLAxiom appendAxiomAnnotations(OWLAxiom axiom, Set<OWLAnnotation> annotations, OWLOntology ontology) {
// filter existing
Set<OWLAnnotation> newAnnotations = new HashSet<OWLAnnotation>(axiom.getAnnotations());
newAnnotations.addAll(annotations);
final OWLAxiom newAxiom = changeAxiomAnnotations(axiom, newAnnotations, ontology);
return newAxiom;
}

/**
* Append xref annotations onto an existing axiom
*
* @param axiom
* @param xrefs
* @param ontology
* @return
*/
public static OWLAxiom appendXrefAnnotations(OWLAxiom axiom, Set<String> xrefs, OWLOntology ontology) {
// filter existing
Set<OWLAnnotation> newAnnotations = new HashSet<OWLAnnotation>(axiom.getAnnotations());
final OWLOntologyManager manager = ontology.getOWLOntologyManager();
final OWLDataFactory factory = manager.getOWLDataFactory();

for (String x : xrefs) {
OWLAnnotationProperty p = factory.getOWLAnnotationProperty(IRI.create("http://www.geneontology.org/formats/oboInOwl#hasDbXref"));
OWLLiteral v = factory.getOWLLiteral(x);
newAnnotations.add(factory.getOWLAnnotation(p, v));
}
final OWLAxiom newAxiom = changeAxiomAnnotations(axiom, newAnnotations, ontology);
return newAxiom;
}


/**
* Update the given axiom to a new set of axiom annotation.<br>
Expand Down
Loading