Help:WikiPathways Webservice/API

From WikiPathways

(Difference between revisions)
Jump to: navigation, search
(Objects)
Line 34: Line 34:
|returns=
|returns=
{{WSFunction/Return|type=[[#WSPathwayInfo|WSPathwayInfo]]|descr=The pathway info.}}
{{WSFunction/Return|type=[[#WSPathwayInfo|WSPathwayInfo]]|descr=The pathway info.}}
 +
}}
 +
 +
{{WSFunction
 +
|name=getPathwayHistory
 +
|descr=Get the revision history of a pathway.
 +
|args=
 +
{{WSFunction/Argument|name=pwId|type=string|descr=The pathway identifier.}}
 +
{{WSFunction/Argument|name=timestamp|type=string|descr=Limit the results by date, only history items after the given timestamp will be included.}}
 +
|returns=
 +
{{WSFunction/Return|type=[[#WSPathwayHistory|WSPathwayHistory]]|descr=The revision history.}}
}}
}}
Line 173: Line 183:
|returns=
|returns=
{{WSFunction/Return|type=base64Binary|descr=The image data (base64 encoded).}}
{{WSFunction/Return|type=base64Binary|descr=The image data (base64 encoded).}}
 +
}}
 +
 +
{{WSFunction
 +
|name=getXrefList
 +
|descr=Get a list of external references on the pathway (gene, protein or metabolite ids), translated to the given database system.
 +
|args=
 +
{{WSFunction/Argument|name=pwId|type=string|descr=The pathway identifier.}}
 +
{{WSFunction/Argument|name=code|type=string|descr=The code of the system to translate to (e.g. 'S' for UniProt).}}
 +
|returns=
 +
{{WSFunction/Return|type=array of string|descr=The external references (ids)}}
 +
}}
 +
 +
{{WSFunction
 +
|name=findPathwaysByLiterature
 +
|descr=Find pathways by their literature references.
 +
|args=
 +
{{WSFunction/Argument|name=query|type=string|descr=The query, can be a pubmed id, author name or title keyword.}}
 +
|returns=
 +
{{WSFunction/Return|type=array of [[#WSSearchResult|WSSearchResult]] descr=The search results.}}
}}
}}
Line 220: Line 249:
|type=string
|type=string
|descr=The content of the pathway (as [http://www.pathvisio.org/EverythingGPML GPML]).
|descr=The content of the pathway (as [http://www.pathvisio.org/EverythingGPML GPML]).
 +
}}
 +
}}
 +
 +
{{WSObject
 +
|name=WSPathwayHistory
 +
|descr='''Extends WSPathwayInfo'''.
 +
 +
Container for pathway revision history. This object inherits all fields from WSPathwayInfo and
 +
has one additional field:
 +
|fields={{WSObject/Field
 +
|name=history
 +
|type=array of WSHistoryRow
 +
|descr=The revision history of the pathway.
 +
}}
 +
}}
 +
 +
{{WSObject
 +
|name=WSHistoryRow
 +
|descr=Info about a single revision of a pathway.
 +
|fields={{WSObject/Field
 +
|name=revision
 +
|type=string
 +
|descr=The revision number of this revision
 +
}}
 +
{{WSObject/Field
 +
|name=comment
 +
|type=string
 +
|descr=The edit description
 +
}}
 +
{{WSObject/Field
 +
|name=user
 +
|type=string
 +
|descr=The username of the user that edited this revision
 +
}}
 +
{{WSObject/Field
 +
|name=timestamp
 +
|type=string
 +
|descr=The timestamp of this revision
}}
}}
}}
}}

Revision as of 13:52, 23 January 2009

Contents

Functions

listOrganisms

Get a list of all available organisms.



listPathways

Get a list of all available pathways.



getPathway

Download the pathway from WikiPathways.


Arguments:

  • string pwId
    • The pathway identifier.
  • integer revision
    • The revision number of the pathway (use '0' for most recent version).


getPathwayInfo

Get some general info about the pathway, such as the name, species, without downloading the GPML.


Arguments:

  • string pwId
    • The pathway identifier.


getPathwayHistory

Get the revision history of a pathway.


Arguments:

  • string pwId
    • The pathway identifier.
  • string timestamp
    • Limit the results by date, only history items after the given timestamp will be included.


getRecentChanges

Get the recently changed pathways.

Note: the recent changes table only retains items for a limited time (2 months), so there is no guarantee that you will get all changes when the timestamp points to a date that is more than 2 months in the past.


Arguments:

  • string timestamp
    • Only get changes from after this time. Timestamp format: yyyymmddMMHHSS.


login

Start a logged in session, using an existing WikiPathways account. This function will return an authentication code that can be used to excecute methods that need authentication (e.g. updatePathway).


Arguments:

  • string name
    • The username of the WikiPathways account.
  • string pass
    • The password of the WikiPathways account.


getPathwayAs

Download a pathway in the specified file format.


Arguments:

  • string fileType
    • Download a pathway in the specified file format.
  • gpml
  • png
  • svg
  • pdf
  • txt
  • pwf

See the download page for an explanation of these file formats.

  • string pwId
    • The pathway identifier.


updatePathway

Update a pathway on the wiki with the given GPML code.

Note: To create/modify pathways via the web service, you need to have an account with web service write permissions. Please contact us to request write access for the web service.


Arguments:

  • string pwId
    • The pathway identifier.
  • string description
    • A description of the modifications.
  • string pass
    • The updated GPML code.
  • integer revision
    • The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.
  • object WSAuth auth
    • The authentication info.


findPathwaysByText

Find pathways using a textual search on the description and text labels of the pathway objects.


Arguments:

  • string query
    • The search query (e.g. 'apoptosis' or 'p53').
  • string species
    • The species to limit the search to (leave blank to search on all species).
  • string pass
    • The updated GPML code.
  • integer revision
    • The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.


findPathwaysByXref

Find pathways by searching on the external references of DataNodes (gene/protein/metabolite identifiers).


Arguments:

  • string id
    • The DataNode identifier (e.g. 'P45985').
  • string code
    • The code of the database system to limit the search to. Leave blank to search on all database systems. See this page for an overview of available system codes.
  • string pass
    • The updated GPML code.
  • integer revision
    • The revision number of the version this GPML code was based on. This is used to prevent edit conflicts in case another client edited the pathway after this client downloaded it.


findInteractions

Find interactions defined in WikiPathways pathways.


Arguments:

  • string query
    • The name of an entity to find interactions for (e.g. 'P53')


saveCurationTag

Apply a curation tag to a pahtway. This operation will overwrite any existing tag with the same name.

Note: To create/modify pathways via the web service, you need to have an account with web service write permissions. Please contact us to request write access for the web service.


Arguments:

  • string pwId
    • The pathway identifier.
  • string tagName
    • The name of the tag to apply.
  • string tagText
    • The tag text (optional).
  • integer revision
    • The revision this tag applies to.
  • object WSAuth auth
    • The authentication info.


removeCurationTag

Remove a curation tag from a pathway.

Note: To create/modify pathways via the web service, you need to have an account with web service write permissions. Please contact us to request write access for the web service.


Arguments:

  • string pwId
    • The pathway identifier.
  • string tagName
    • The name of the tag to remove.
  • object WSAuth auth
    • The authentication info.


getCurationTags

Get all curation tags for the given pathway.


Arguments:

  • string pwId
    • The pathway identifier.


getColoredPathway

Get a colored image version of the pathway.


Arguments:

  • string pwId
    • The pathway identifier.
  • integer revision
    • The revision number of the pathway (use '0' for most recent version).
  • array of string graphId
    • An array with graphIds of the objects to color.
  • array of string graphId
    • An array with colors of the objects (should be the same length as graphId).

Colors should be encoded as a hexadecimal number, e.g. FF0000 for red).

  • string fileType
    • The image type (One of 'svg', 'pdf' or 'png').


getXrefList

Get a list of external references on the pathway (gene, protein or metabolite ids), translated to the given database system.


Arguments:

  • string pwId
    • The pathway identifier.
  • string code
    • The code of the system to translate to (e.g. 'S' for UniProt).


findPathwaysByLiterature

Find pathways by their literature references.


Arguments:

  • string query
    • The query, can be a pubmed id, author name or title keyword.



Objects

This section explains the different object classes defined in the WSDL.

WSPathwayInfo

Container for pathway metadata, such as name, organism and url.

Fields:

  • string id
    • The pathway identifier
  • string name
    • The name of the pathway
  • string species
    • The species (organism) of the pathway
  • string revision
    • The revision number of the pathway
  • string url
    • The url to the pathway

WSPathway

Extends WSPathwayInfo.

Container for pathway metadata and content. This object inherits all fields from WSPathwayInfo and has one additional field:

Fields:

  • string gpml
    • The content of the pathway (as GPML).

WSPathwayHistory

Extends WSPathwayInfo.

Container for pathway revision history. This object inherits all fields from WSPathwayInfo and has one additional field:

Fields:

  • array of WSHistoryRow history
    • The revision history of the pathway.

WSHistoryRow

Info about a single revision of a pathway.

Fields:

  • string revision
    • The revision number of this revision
  • string comment
    • The edit description
  • string user
    • The username of the user that edited this revision
  • string timestamp
    • The timestamp of this revision

WSAuth

Container for authentication data for a logged in WikiPathways session.

Fields:

  • string username
    • The username of a WikiPathways account
  • string key
    • The authentication key of the session (can be obtained by calling the login function).

WSSearchResult

Container for a single search result.

Fields:

  • double score
    • The score of the search result
  • string id
    • The pathway identifier
  • string name
    • The name of the pathway
  • string species
    • The species (organism) of the pathway
  • string revision
    • The revision number of the pathway
  • string url
    • The url to the pathway
  • array of WSIndexField fields
    • An array of index fields that were returned with the search. The included fields vary among different search functions. For example, it includes an array of hashes of arrays to represent interactions involving grouped objects.

WSIndexField

Container for a single index field.

Fields:

  • string name
    • The name of the index field.
  • array of string values
    • An array with the value(s) of the field.


WSCurationTag

Container for a single index field.

Fields:

  • string name
    • The internal tag name.
  • string displayName
    • The display name of the tag.
  • object WSPathwayInfo pathway
    • The pathway this tag applies to.
  • string revision
    • The revision this tag applies to. '0' is used for tags that apply to all revisions.
  • string text
    • The tag text.
  • long timeModified
    • The timestamp of the last modified date.
  • string userModified
    • The username of the user that last modified the tag.

Return to Web Services help page

Personal tools