Permalink
Browse files

[#24] first experiment

  • Loading branch information...
jnguyenx committed Dec 16, 2016
1 parent 61bddab commit 29bceb5c0f73c9354ecd210e29fd6f6d8b864382
View
@@ -6,7 +6,7 @@ target/
./src/test/resources/catalog-v001.xml
*iml
.idea
/bin/
**/bin/
**/semantic.cache
owlsim-services/js
owlsim-services/python
View
@@ -176,11 +176,6 @@
<artifactId>JavaEWAH</artifactId>
<version>0.7.7</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.3</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
@@ -189,7 +184,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6.1</version>
<version>3.6.1</version>
</dependency>
<dependency>
<groupId>org.prefixcommons</groupId>
<artifactId>curie-util</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
@@ -1,15 +1,12 @@
package org.monarchinitiative.owlsim.compute.enrich;
import java.io.IOException;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import org.monarchinitiative.owlsim.compute.enrich.impl.HypergeometricEnrichmentEngine;
import org.monarchinitiative.owlsim.compute.matcher.impl.JaccardSimilarityProfileMatcher;
import com.google.common.reflect.ClassPath;
import com.google.inject.AbstractModule;
import com.google.inject.Injector;
import com.google.inject.Provides;
@@ -87,8 +87,8 @@
private Logger LOG = Logger.getLogger(BayesianNetworkProfileMatcher.class);
double falseNegativeRate = 0.01; // TODO - do not harcode
double falsePositiveRate = 0.01; // TODO - do not harcode
double falseNegativeRate = 0.01; // TODO - do not hardcode
double falsePositiveRate = 0.01; // TODO - do not hardcode
ConditionalProbabilityIndex cpi = null; // index of Pr(Node={on,off}|ParentsState)
@@ -12,7 +12,7 @@
/**
* @param iri
* @return Shorform (aka ID, CURIE)
* @return Short form (aka ID, CURIE)
*/
public String getShortForm(IRI iri);
@@ -7,8 +7,8 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.zip.GZIPInputStream;
import javax.inject.Singleton;
@@ -18,21 +18,16 @@
import org.monarchinitiative.owlsim.kb.bindings.IndicatesOwlDataOntologies;
import org.monarchinitiative.owlsim.kb.bindings.IndicatesOwlOntologies;
import org.monarchinitiative.owlsim.kb.impl.BMKnowledgeBaseOWLAPIImpl;
import org.prefixcommons.CurieUtil;
import org.semanticweb.elk.owlapi.ElkReasonerFactory;
import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.model.HasAxioms;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLDataFactory;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory;
import uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl;
import uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl;
import uk.ac.manchester.cs.owl.owlapi.concurrent.NoOpReadWriteLock;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
@@ -48,21 +43,25 @@
private final ImmutableCollection<String> ontologyUris;
private final ImmutableCollection<String> ontologyDataUris;
private final ImmutableCollection<String> dataTsvs;
private final ImmutableMap<String, String> curies;
private final UrlValidator urlValdiator = UrlValidator.getInstance();
public KnowledgeBaseModule(Collection<String> ontologyUris,
Collection<String> ontologyDataUris,
Set<String> dataTsvs) {
Set<String> dataTsvs,
Map<String, String> curies) {
this.ontologyUris = new ImmutableSet.Builder<String>().addAll(ontologyUris).build();
this.ontologyDataUris = new ImmutableSet.Builder<String>().addAll(ontologyDataUris).build();
this.dataTsvs = new ImmutableSet.Builder<String>().addAll(dataTsvs).build();
this.curies = new ImmutableMap.Builder<String, String>().putAll(curies).build();
}
@Override
protected void configure() {
bind(BMKnowledgeBase.class).to(BMKnowledgeBaseOWLAPIImpl.class).in(Singleton.class);
bind(OWLReasonerFactory.class).to(ElkReasonerFactory.class);
bind(CurieUtil.class).toInstance(new CurieUtil(curies));
// bind(OWLOntologyManager.class).to(OWLOntologyManagerImpl.class);
// bind(ReadWriteLock.class).to(NoOpReadWriteLock.class);
// bind(OWLDataFactory.class).to(OWLDataFactoryImpl.class);
Oops, something went wrong.

0 comments on commit 29bceb5

Please sign in to comment.