org.biopax.paxtools.query
Class QueryExecuter

java.lang.Object
  extended by org.biopax.paxtools.query.QueryExecuter

public class QueryExecuter
extends Object

Author:
Ozgun Babur

Constructor Summary
QueryExecuter()
           
 
Method Summary
static Set<PhysicalEntity> getRelatedPhysicalEntities(BioPAXElement element, Set<PhysicalEntity> pes)
          Gets the related PhysicalEntity objects of the given BioPAXElement, in level 3 models.
static Map<BioPAXElement,Set<PhysicalEntity>> getRelatedPhysicalEntityMap(Collection<BioPAXElement> elements)
          Maps each BioPAXElement to its related PhysicalEntity objects.
static Set<Node> prepareSingleNodeSet(Set<BioPAXElement> elements, Graph graph)
          Gets the related physical entities and wraps in a single node set.
static Set<BioPAXElement> runCommonStream(Set<BioPAXElement> sourceSet, Model model, Direction direction, int limit)
           
static Set<BioPAXElement> runCommonStream(Set<BioPAXElement> sourceSet, Model model, Direction direction, int limit, Set<String> ubiqueIDs)
          Gets the elements in the common upstream or downstream of the seed
static Set<BioPAXElement> runCommonStreamWithPOI(Set<BioPAXElement> sourceSet, Model model, Direction direction, int limit)
           
static Set<BioPAXElement> runCommonStreamWithPOI(Set<BioPAXElement> sourceSet, Model model, Direction direction, int limit, Set<String> ubiqueIDs)
          First finds the common stream, then completes it with the paths between seed and common stream.
static Set<BioPAXElement> runGOI(Set<BioPAXElement> sourceSet, Model model, int limit)
           
static Set<BioPAXElement> runGOI(Set<BioPAXElement> sourceSet, Model model, int limit, Set<String> ubiqueIDs)
          Gets paths between the seed nodes.
static Set<BioPAXElement> runNeighborhood(Set<BioPAXElement> sourceSet, Model model, int limit, Direction direction)
           
static Set<BioPAXElement> runNeighborhood(Set<BioPAXElement> sourceSet, Model model, int limit, Direction direction, Set<String> ubiqueIDs)
          Gets neighborhood of the source set.
static Set<BioPAXElement> runPathsBetween(Set<BioPAXElement> sourceSet, Model model, int limit)
           
static Set<BioPAXElement> runPathsBetween(Set<BioPAXElement> sourceSet, Model model, int limit, Set<String> ubiqueIDs)
          Gets the graph constructed by the paths between the given seed nodes.
static Set<BioPAXElement> runPOI(Set<BioPAXElement> sourceSet, Set<BioPAXElement> targetSet, Model model, LimitType limitType, int limit)
           
static Set<BioPAXElement> runPOI(Set<BioPAXElement> sourceSet, Set<BioPAXElement> targetSet, Model model, LimitType limitType, int limit, Set<String> ubiqueIDs)
          Gets paths the graph composed of the paths from a source node, and ends at a target node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryExecuter

public QueryExecuter()
Method Detail

runNeighborhood

public static Set<BioPAXElement> runNeighborhood(Set<BioPAXElement> sourceSet,
                                                 Model model,
                                                 int limit,
                                                 Direction direction)
See Also:
runNeighborhood(java.util.Set, org.biopax.paxtools.model.Model, int, org.biopax.paxtools.query.algorithm.Direction)

runNeighborhood

public static Set<BioPAXElement> runNeighborhood(Set<BioPAXElement> sourceSet,
                                                 Model model,
                                                 int limit,
                                                 Direction direction,
                                                 Set<String> ubiqueIDs)
Gets neighborhood of the source set.

Parameters:
sourceSet - seed to the query
model - BioPAX model
limit - neigborhood distance to get
direction - UPSTREAM, DOWNSTREAM or BOTHSTREAM
ubiqueIDs - RDF IDs of ubiquitous entity references. can be null
Returns:
BioPAX elements in the result set

runPathsBetween

public static Set<BioPAXElement> runPathsBetween(Set<BioPAXElement> sourceSet,
                                                 Model model,
                                                 int limit)
See Also:
runPathsBetween(java.util.Set, org.biopax.paxtools.model.Model, int)

runPathsBetween

public static Set<BioPAXElement> runPathsBetween(Set<BioPAXElement> sourceSet,
                                                 Model model,
                                                 int limit,
                                                 Set<String> ubiqueIDs)
Gets the graph constructed by the paths between the given seed nodes. Does not get paths between physical entities that belong the same entity reference.

Parameters:
sourceSet - Seed to the query
model - BioPAX model
limit - Length limit for the paths to be found
ubiqueIDs - RDF IDs of ubiquitous PEs. Can be null
Returns:
BioPAX elements in the result

runGOI

public static Set<BioPAXElement> runGOI(Set<BioPAXElement> sourceSet,
                                        Model model,
                                        int limit)
See Also:
runGOI(java.util.Set, org.biopax.paxtools.model.Model, int)

runGOI

public static Set<BioPAXElement> runGOI(Set<BioPAXElement> sourceSet,
                                        Model model,
                                        int limit,
                                        Set<String> ubiqueIDs)
Gets paths between the seed nodes.

Parameters:
sourceSet - Seed to the query
model - BioPAX model
limit - Length limit for the paths to be found
ubiqueIDs - RDF IDs of the ubiquitous physical entities. Can be null
Returns:
BioPAX elements in the result

runPOI

public static Set<BioPAXElement> runPOI(Set<BioPAXElement> sourceSet,
                                        Set<BioPAXElement> targetSet,
                                        Model model,
                                        LimitType limitType,
                                        int limit)
See Also:
runPOI(java.util.Set, java.util.Set, org.biopax.paxtools.model.Model, org.biopax.paxtools.query.algorithm.LimitType, int)

runPOI

public static Set<BioPAXElement> runPOI(Set<BioPAXElement> sourceSet,
                                        Set<BioPAXElement> targetSet,
                                        Model model,
                                        LimitType limitType,
                                        int limit,
                                        Set<String> ubiqueIDs)
Gets paths the graph composed of the paths from a source node, and ends at a target node.

Parameters:
sourceSet - Seeds for start points of paths
targetSet - Seeds for end points of paths
model - BioPAX model
limitType - either NORMAL or SHORTEST_PLUS_K
limit - Length limit fothe paths to be found
ubiqueIDs - RDF IDs of the ubiquitous physical entities. Can be null
Returns:
BioPAX elements in the result

runCommonStream

public static Set<BioPAXElement> runCommonStream(Set<BioPAXElement> sourceSet,
                                                 Model model,
                                                 Direction direction,
                                                 int limit)
See Also:
runCommonStream(java.util.Set, org.biopax.paxtools.model.Model, org.biopax.paxtools.query.algorithm.Direction, int)

runCommonStream

public static Set<BioPAXElement> runCommonStream(Set<BioPAXElement> sourceSet,
                                                 Model model,
                                                 Direction direction,
                                                 int limit,
                                                 Set<String> ubiqueIDs)
Gets the elements in the common upstream or downstream of the seed

Parameters:
sourceSet - Seed to the query
model - BioPAX model
direction - UPSTREAM or DOWNSTREAM
limit - Length limit for the search
ubiqueIDs - RDF IDs of the ubiquitous physical entities. Can be null
Returns:
BioPAX elements in the result

runCommonStreamWithPOI

public static Set<BioPAXElement> runCommonStreamWithPOI(Set<BioPAXElement> sourceSet,
                                                        Model model,
                                                        Direction direction,
                                                        int limit)
See Also:
runCommonStreamWithPOI(java.util.Set, org.biopax.paxtools.model.Model, org.biopax.paxtools.query.algorithm.Direction, int, java.util.Set)

runCommonStreamWithPOI

public static Set<BioPAXElement> runCommonStreamWithPOI(Set<BioPAXElement> sourceSet,
                                                        Model model,
                                                        Direction direction,
                                                        int limit,
                                                        Set<String> ubiqueIDs)
First finds the common stream, then completes it with the paths between seed and common stream.

Parameters:
sourceSet - Seed to the query
model - BioPAX model
direction - UPSTREAM or DOWNSTREAM
limit - Length limit for the search
ubiqueIDs - RDF IDs of the ubiquitous physical entities. Can be null
Returns:
BioPAX elements in the result

prepareSingleNodeSet

public static Set<Node> prepareSingleNodeSet(Set<BioPAXElement> elements,
                                             Graph graph)
Gets the related physical entities and wraps in a single node set.

Parameters:
elements -
graph -
Returns:

getRelatedPhysicalEntityMap

public static Map<BioPAXElement,Set<PhysicalEntity>> getRelatedPhysicalEntityMap(Collection<BioPAXElement> elements)
Maps each BioPAXElement to its related PhysicalEntity objects.

Parameters:
elements -
Returns:

getRelatedPhysicalEntities

public static Set<PhysicalEntity> getRelatedPhysicalEntities(BioPAXElement element,
                                                             Set<PhysicalEntity> pes)
Gets the related PhysicalEntity objects of the given BioPAXElement, in level 3 models.

Parameters:
element - to get related PhysicalEntity objects
pes - result set. if not supplied, a new set will be initialized.
Returns:


Copyright © 2011 BioPAX. All Rights Reserved.