Skip to content

Commit

Permalink
Added convenience method for comparing two query profiles, for #32
Browse files Browse the repository at this point in the history
Call like this:

  Match pairMatch = profileMatcher.compareProfilePair(qp, tp);

To implement this, we extend the notion of the target item set
to include anonymous individuals. The target profile is treated as
an anonymous individual
  • Loading branch information
cmungall committed Dec 2, 2016
1 parent a4a9c23 commit 599928b
Show file tree
Hide file tree
Showing 10 changed files with 449 additions and 194 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package org.monarchinitiative.owlsim.compute.matcher;

import java.util.Set;

import org.monarchinitiative.owlsim.compute.cpt.IncoherentStateException;
import org.monarchinitiative.owlsim.kb.BMKnowledgeBase;
import org.monarchinitiative.owlsim.kb.filter.UnknownFilterException;
import org.monarchinitiative.owlsim.model.match.Match;
import org.monarchinitiative.owlsim.model.match.MatchSet;
import org.monarchinitiative.owlsim.model.match.ProfileQuery;

Expand Down Expand Up @@ -45,6 +48,17 @@ public interface ProfileMatcher {
* @return profile query corresponding to individual
*/
public ProfileQuery createPositiveProfileQuery(String individualId);

/**
* Create a query from a set of positive and negative class Ids
*
* @param classIds
* @param negatedClassIds
* @return profile query
*/
public ProfileQuery createProfileQueryFromClasses(Set<String> classIds,
Set<String> negatedClassIds);




Expand All @@ -70,6 +84,17 @@ public interface ProfileMatcher {
*/
MatchSet findMatchProfile(ProfileQuery q, double alpha) throws UnknownFilterException, IncoherentStateException;

/**
* Finds matches for a given individual already known to the kb
*
* @param q
* @param t
* @return scored matche
* @throws UnknownFilterException
* @throws IncoherentStateException
*/
public Match compareProfilePair(ProfileQuery q, ProfileQuery t) throws UnknownFilterException, IncoherentStateException;

/**
*
*
Expand Down
Loading

0 comments on commit 599928b

Please sign in to comment.