Pathway Commons client

A client to the PathwayCommons REST API. For more details about the service, see the documentation at https://www.pathwaycommons.org/pc2/.

pybiopax.pc_client.graph_query(kind, source, target=None, **query_params)[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 single gene name or a list of gene names which are the source set for the graph query.

  • target (Optional[list[str]]) – A single gene name or a list of gene names which are the target set for the graph query. Only needed for ‘pathsfromto’ queries.

  • limit (Optional[int]) – This limits the length of the longest path considered in the graph query. Default: 1

  • organism (Optional[str]) – The organism used for the query. Default: ‘9606’ corresponding to human.

  • datasource (Optional[list[str]]) – A list of database sources that the query results should include. Example: [‘pid’, ‘panther’]. By default, all databases are considered.

Returns

A BioPAX OWL string that can then be deserialized into a BioPaxModel.

Return type

str