Biopax (indra.sources.biopax)

Biopax API (indra.sources.biopax.biopax_api)

indra.sources.biopax.biopax_api.process_model(model)[source]

Returns a BiopaxProcessor for a BioPAX model object.

Parameters:model (org.biopax.paxtools.model.Model) – A BioPAX model object.
Returns:bp – A BiopaxProcessor containing the obtained BioPAX model in bp.model.
Return type:BiopaxProcessor
indra.sources.biopax.biopax_api.process_owl(owl_filename)[source]

Returns a BiopaxProcessor for a BioPAX OWL file.

Parameters:owl_filename (string) – The name of the OWL file to process.
Returns:bp – A BiopaxProcessor containing the obtained BioPAX model in bp.model.
Return type:BiopaxProcessor
indra.sources.biopax.biopax_api.process_pc_neighborhood(gene_names, neighbor_limit=1, database_filter=None)[source]

Returns a BiopaxProcessor for a PathwayCommons neighborhood query.

The neighborhood query finds the neighborhood around a set of source genes.

http://www.pathwaycommons.org/pc2/#graph

http://www.pathwaycommons.org/pc2/#graph_kind

Parameters:
  • gene_names (list) – A list of HGNC gene symbols to search the neighborhood of. Examples: [‘BRAF’], [‘BRAF’, ‘MAP2K1’]
  • neighbor_limit (Optional[int]) – The number of steps to limit the size of the neighborhood around the gene names being queried. Default: 1
  • database_filter (Optional[list]) – A list of database identifiers to which the query is restricted. Examples: [‘reactome’], [‘biogrid’, ‘pid’, ‘psp’] If not given, all databases are used in the query. For a full list of databases see http://www.pathwaycommons.org/pc2/datasources
Returns:

bp – A BiopaxProcessor containing the obtained BioPAX model in bp.model.

Return type:

BiopaxProcessor

indra.sources.biopax.biopax_api.process_pc_pathsbetween(gene_names, neighbor_limit=1, database_filter=None)[source]

Returns a BiopaxProcessor for a PathwayCommons paths-between query.

The paths-between query finds the paths between a set of genes. Here source gene names are given in a single list and all directions of paths between these genes are considered.

http://www.pathwaycommons.org/pc2/#graph

http://www.pathwaycommons.org/pc2/#graph_kind

Parameters:
  • gene_names (list) – A list of HGNC gene symbols to search for paths between. Examples: [‘BRAF’, ‘MAP2K1’]
  • neighbor_limit (Optional[int]) – The number of steps to limit the length of the paths between the gene names being queried. Default: 1
  • database_filter (Optional[list]) – A list of database identifiers to which the query is restricted. Examples: [‘reactome’], [‘biogrid’, ‘pid’, ‘psp’] If not given, all databases are used in the query. For a full list of databases see http://www.pathwaycommons.org/pc2/datasources
Returns:

bp – A BiopaxProcessor containing the obtained BioPAX model in bp.model.

Return type:

BiopaxProcessor

indra.sources.biopax.biopax_api.process_pc_pathsfromto(source_genes, target_genes, neighbor_limit=1, database_filter=None)[source]

Returns a BiopaxProcessor for a PathwayCommons paths-from-to query.

The paths-from-to query finds the paths from a set of source genes to a set of target genes.

http://www.pathwaycommons.org/pc2/#graph

http://www.pathwaycommons.org/pc2/#graph_kind

Parameters:
  • source_genes (list) – A list of HGNC gene symbols that are the sources of paths being searched for. Examples: [‘BRAF’, ‘RAF1’, ‘ARAF’]
  • target_genes (list) – A list of HGNC gene symbols that are the targets of paths being searched for. Examples: [‘MAP2K1’, ‘MAP2K2’]
  • neighbor_limit (Optional[int]) – The number of steps to limit the length of the paths between the source genes and target genes being queried. Default: 1
  • database_filter (Optional[list]) – A list of database identifiers to which the query is restricted. Examples: [‘reactome’], [‘biogrid’, ‘pid’, ‘psp’] If not given, all databases are used in the query. For a full list of databases see http://www.pathwaycommons.org/pc2/datasources
Returns:

bp – A BiopaxProcessor containing the obtained BioPAX model in bp.model.

Return type:

BiopaxProcessor

Biopax Processor (indra.sources.biopax.processor)

class indra.sources.biopax.processor.BiopaxProcessor(model)[source]

The BiopaxProcessor extracts INDRA Statements from a BioPAX model.

The BiopaxProcessor uses pattern searches in a BioPAX OWL model to extract mechanisms from which it constructs INDRA Statements.

Parameters:model (org.biopax.paxtools.model.Model) – A BioPAX model object (java object)
model

org.biopax.paxtools.model.Model – A BioPAX model object (java object) which is queried using Paxtools to extract INDRA Statements

statements

list[indra.statements.Statement] – A list of INDRA Statements that were extracted from the model.

get_activity_modification()[source]

Extract INDRA ActiveForm statements from the BioPAX model.

This method extracts ActiveForm Statements that are due to protein modifications. This method reuses the structure of BioPAX Pattern’s org.biopax.paxtools.pattern.PatternBox.constrolsStateChange pattern with additional constraints to specify the gain or loss of a modification occurring (phosphorylation, deubiquitination, etc.) and the gain or loss of activity due to the modification state change.

get_complexes()[source]

Extract INDRA Complex Statements from the BioPAX model.

This method searches for org.biopax.paxtools.model.level3.Complex objects which represent molecular complexes. It doesn’t reuse BioPAX Pattern’s org.biopax.paxtools.pattern.PatternBox.inComplexWith query since that retrieves pairs of complex members rather than the full complex.

get_conversions()[source]

Extract Conversion INDRA Statements from the BioPAX model.

This method uses a custom BioPAX Pattern (one that is not implemented PatternBox) to query for BiochemicalReactions whose left and right hand sides are collections of SmallMolecules. This pattern thereby extracts metabolic conversions as well as signaling processes via small molecules (e.g. lipid phosphorylation or cleavage).

get_gap()[source]

Extract Gap INDRA Statements from the BioPAX model.

This method uses a custom BioPAX Pattern (one that is not implemented PatternBox) to query for controlled BiochemicalReactions in which the same protein is in complex with GTP on the left hand side and in complex with GDP on the right hand side. This implies that the controller is a GAP for the GDP/GTP-bound protein.

get_gef()[source]

Extract Gef INDRA Statements from the BioPAX model.

This method uses a custom BioPAX Pattern (one that is not implemented PatternBox) to query for controlled BiochemicalReactions in which the same protein is in complex with GDP on the left hand side and in complex with GTP on the right hand side. This implies that the controller is a GEF for the GDP/GTP-bound protein.

get_modifications()[source]

Extract INDRA Modification Statements from the BioPAX model.

To extract Modifications, this method reuses the structure of BioPAX Pattern’s org.biopax.paxtools.pattern.PatternBox.constrolsStateChange pattern with additional constraints to specify the type of state change occurring (phosphorylation, deubiquitination, etc.).

get_regulate_activities()[source]

Get Activation/Inhibition INDRA Statements from the BioPAX model.

This method extracts Activation/Inhibition Statements and reuses the structure of BioPAX Pattern’s org.biopax.paxtools.pattern.PatternBox.constrolsStateChange pattern with additional constraints to specify the gain or loss of activity state but assuring that the activity change is not due to a modification state change (which are extracted by get_modifications and get_activity_modification).

get_regulate_amounts()[source]

Extract INDRA RegulateAmount Statements from the BioPAX model.

This method extracts IncreaseAmount/DecreaseAmount Statements from the BioPAX model. It fully reuses BioPAX Pattern’s org.biopax.paxtools.pattern.PatternBox.controlsExpressionWithTemplateReac pattern to find TemplateReactions which control the expression of a protein.

print_statements()[source]

Print all INDRA Statements collected by the processors.

save_model(file_name=None)[source]

Save the BioPAX model object in an OWL file.

Parameters:file_name (Optional[str]) – The name of the OWL file to save the model in.

Pathway Commons Client (indra.sources.biopax.pathway_commons_client)

indra.sources.biopax.pathway_commons_client.graph_query(kind, source, target=None, neighbor_limit=1, database_filter=None)[source]

Perform a graph query on PathwayCommons.

For more information on these queries, see http://www.pathwaycommons.org/pc2/#graph

Parameters:
  • kind (str) – The kind of graph query to perform. Currently 3 options are implemented, ‘neighborhood’, ‘pathsbetween’ and ‘pathsfromto’.
  • source (list[str]) – A list of gene names which are the source set for the graph query.
  • target (Optional[list[str]]) – A list of gene names which are the target set for the graph query. Only needed for ‘pathsfromto’ queries.
  • neighbor_limit (Optional[int]) – This limits the length of the longest path considered in the graph query. Default: 1
Returns:

model – A BioPAX model (java object).

Return type:

org.biopax.paxtools.model.Model

indra.sources.biopax.pathway_commons_client.model_to_owl(model, fname)[source]

Save a BioPAX model object as an OWL file.

Parameters:
  • model (org.biopax.paxtools.model.Model) – A BioPAX model object (java object).
  • fname (str) – The name of the OWL file to save the model in.
indra.sources.biopax.pathway_commons_client.owl_str_to_model(owl_str)[source]

Return a BioPAX model object from an OWL string.

Parameters:owl_str (str) – The model as an OWL string.
Returns:biopax_model – A BioPAX model object (java object).
Return type:org.biopax.paxtools.model.Model
indra.sources.biopax.pathway_commons_client.owl_to_model(fname)[source]

Return a BioPAX model object from an OWL file.

Parameters:fname (str) – The name of the OWL file containing the model.
Returns:biopax_model – A BioPAX model object (java object).
Return type:org.biopax.paxtools.model.Model