Query classes (emmaa.queries)

class emmaa.queries.ComparativeInterventionProperty[source]

Bases: emmaa.queries.Query

class emmaa.queries.DynamicProperty(entity, pattern_type, quant_value=None, quant_type='qualitative')[source]

Bases: emmaa.queries.Query

This type of query requires dynamic simulation of the model to check whether the queried temporal pattern is satisfied.

Parameters:
  • entity (indra.statements.Agent) – An entity to simulate the model for.
  • pattern_type (str) – Type of temporal pattern. Accepted values: ‘always_value’, ‘no_change’, ‘eventual_value’, ‘sometime_value’, ‘sustained’, ‘transient’.
  • quant_value (str or float) – Value of molecular quantity of entity of interest. Can be ‘high’ or ‘low’ or a specific number.
  • quant_type (str) – Type of molecular quantity of entity of interest. Default: qualitative.
get_temporal_pattern()[source]

Return TemporalPattern object created with query properties.

exception emmaa.queries.GroundingError[source]

Bases: Exception

class emmaa.queries.OpenSearchQuery(entity, stmt_type, entity_role, terminal_ns=None)[source]

Bases: emmaa.queries.Query

This type of query requires doing an open ended breadth-first search to find paths satisfying the query.

Parameters:
  • entity (indra.statements.Agent) – An entity to simulate the model for.
  • stmt_type (str) – Name of statement type.
  • entity_role (str) – What role entity should play in statement (subject or object).
  • terminal_ns (list[str]) – Force a path to terminate when any of the namespaces in this list are encountered and only yield paths that terminate at these namepsaces
path_stmt

An INDRA statement having its subject or object set to None to represent open search query.

Type:indra.statements.Statement
class emmaa.queries.PathProperty(path_stmt, entity_constraints=None, relationship_constraints=None)[source]

Bases: emmaa.queries.Query

This type of query requires finding a mechanistic causally consistent path that satisfies query statement.

Parameters:
  • path_stmt (indra.statements.Statement) – A path to look for in the model represented as INDRA statement.
  • entity_constraints (dict(list(indra.statements.Agent))) – A dictionary containing lists of Agents to be included in or excluded from the path.
  • relationship_constraints (dict(list(str))) – A dictionary containing lists of Statement types to include in or exclude from the path.
get_entities()[source]

Return entities from the path statement and the inclusion list.

class emmaa.queries.Query[source]

Bases: object

The parent class of all query types.

class emmaa.queries.SimpleInterventionProperty[source]

Bases: emmaa.queries.Query

class emmaa.queries.StructuralProperty[source]

Bases: emmaa.queries.Query

emmaa.queries.get_agent_from_gilda(ag_name)[source]

Return an INDRA Agent object by grounding its entity text with Gilda.

emmaa.queries.get_agent_from_text(ag_text)[source]

Return an INDRA Agent object by grounding its entity text with either Gilda or TRIPS.

emmaa.queries.get_agent_from_trips(ag_text, service_host='http://34.230.33.149:8002/cgi/')[source]

Return an INDRA Agent object by grounding its entity text with TRIPS.