Biopax (indra.biopax)

Biopax API (indra.biopax.biopax_api)

indra.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.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.biopax.biopax_api.process_pc_neighborhood(gene_names, neighbor_limit=1)[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
Returns:

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

Return type:

BiopaxProcessor

indra.biopax.biopax_api.process_pc_pathsbetween(gene_names, neighbor_limit=1)[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
Returns:

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

Return type:

BiopaxProcessor

indra.biopax.biopax_api.process_pc_pathsfromto(source_genes, target_genes, neighbor_limit=1)[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
Returns:

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

Return type:

BiopaxProcessor

Biopax Processor (indra.biopax.processor)

class indra.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_acetylation()[source]

Extract INDRA Acetylation statements from the model.

get_activity_modification()[source]

Extract INDRA ActiveForm statements from the model.

get_complexes()[source]

Extract INDRA Complex statements from the model.

get_dephosphorylation()[source]

Extract INDRA Dephosphorylation statements from the model.

get_glycosylation()[source]

Extract INDRA Glycosylation statements from the model.

get_palmitoylation()[source]

Extract INDRA Palmitoylation statements from the model.

get_phosphorylation()[source]

Extract INDRA Phosphorylation statements from the model.

get_regulate_amounts()[source]

Extract INDRA RegulateAmount statements from the model.

get_ubiquitination()[source]

Extract INDRA Ubiquitination statements from the model.

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.biopax.pathway_commons_client)

indra.biopax.pathway_commons_client.graph_query(kind, source, target=None, neighbor_limit=1)[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.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.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.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