|
m |
(102 intermediate revisions not shown.) |
Line 1: |
Line 1: |
- | '''<span style="color:#FF0000"><BIG>This page is under construction</BIG></span>'''
| + | __NOEDITSECTION__ |
- | | + | = Web Services for WikiPathways = |
- | WikiPathways can be accessed through a SOAP webservice. This page contains documentation for the webservice API. | + | {| |
- | | + | | |
- | == WSDL ==
| + | WikiPathways can be accessed programmatically through a REST web service. These services provide powerful means to query, access and interact with the pathway content at WikiPathways. |
- | The WSDL file for the WikiPathways webservice can be downloaded from:
| + | |rowspan="2" valign="top"|__TOC__ |
- | [http://www.wikipathways.org/wpi/webservice/webservice.php?wsdl http://www.wikipathways.org/wpi/webservice/webservice.php?wsdl]
| + | |- |
- | | + | | |
- | == Examples == | + | |
- | === Java ===
| + | |
- | Check out [http://svn.bigcat.unimaas.nl/pathvisio/trunk/tools/soap-axis2/ the subversion repository] for example code on how to call the webservice from Java with [http://ws.apache.org/axis2/ Apache Axis 2].
| + | |
- | === Taverna ===
| + | |
- | You can use the WikiPathways webservice to integrate WikiPathways functions in your Taverna workflows. See [http://www.myexperiment.org/packs/30 myexperiment.org] for a set of example workflows that show how to call WikiPathways from Taverna.
| + | |
| | | |
| == API Reference == | | == API Reference == |
- | === Functions ===
| + | See the [https://webservice.wikipathways.org Swagger] page for a list of available web service functions and data structures. |
- | ==== listOrganisms ====
| + | |
- | Get a list of all available organisms.
| + | |
- | {|class=wikitable
| + | |
- | |colspan=3 | '''returns'''
| + | |
- | |-
| + | |
- | |array of string
| + | |
- | |The names of the supported organisms
| + | |
- | |}
| + | |
- | ==== listPathways ====
| + | |
- | Get a list of all available pathways.
| + | |
- | {|class=wikitable
| + | |
- | |colspan=3 | '''returns'''
| + | |
- | |-
| + | |
- | |array of object [[Help:WikiPathways_Webservice#WSPathwayInfo|WSPathwayInfo]]
| + | |
- | |The available pathways.
| + | |
- | |}
| + | |
- | ==== getPathway ====
| + | |
- | Download the pathway from WikiPathways.
| + | |
- | {|class=wikitable
| + | |
- | |colspan=3 | ''Arguments''
| + | |
- | |-
| + | |
- | |'''Type'''
| + | |
- | |'''Name'''
| + | |
- | |'''Description'''
| + | |
- | |-
| + | |
- | |string
| + | |
- | |pwName
| + | |
- | |The pathway name
| + | |
- | |-
| + | |
- | |string
| + | |
- | |pwSpecies
| + | |
- | |The pathway species
| + | |
- | |-
| + | |
- | |integer
| + | |
- | |revision
| + | |
- | |The revision number of the pathway (use '0' for most recent version)
| + | |
- | |-
| + | |
- | |colspan=3 | ''Returns''
| + | |
- | |-
| + | |
- | |colspan=2 | array of object [[Help:WikiPathways_Webservice#WSPathwayInfo|WSPathwayInfo]]
| + | |
- | || The available pathways.
| + | |
- | |}
| + | |
- | ==== 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.
| + | === Java libraries === |
| | | |
- | {|class=wikitable
| + | You can get a high-level API to the WikiPathways web service here: [http://developers.pathvisio.org/browser/trunk/modules/org.wikipathways.client source] [http://developers.pathvisio.org/data/releases compiled binaries] (choose the most recent wikipathways_client_bin-*). |
- | |colspan=3 | ''Arguments''
| + | |
- | |-
| + | |
- | |'''Type'''
| + | |
- | |'''Name'''
| + | |
- | |'''Description'''
| + | |
- | |-
| + | |
- | |string
| + | |
- | |timestamp
| + | |
- | |Only get changes from after this time. Timestamp format: yyyymmddMMHHSS.
| + | |
- | |-
| + | |
- | |colspan=3 | ''Returns''
| + | |
- | |-
| + | |
- | |colspan=2 | array of object [[Help:WikiPathways_Webservice#WSPathwayInfo|WSPathwayInfo]]
| + | |
- | || The changed pathways.
| + | |
- | |}
| + | |
| | | |
- | ==== login ==== | + | === Working with GPML === |
- | 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).
| + | The pathways on WikiPathways are stored in the GPML format. This is an XML format and can be processed in any programming language. See [http://developers.pathvisio.org/wiki/EverythingGpml here] for the GPML specification. If you are developing in Java, we recommend using our [[#Java libraries|Java libraries]]. |
- | {|class=wikitable
| + | |
- | |colspan=3 | ''Arguments''
| + | |
- | |-
| + | |
- | |'''Type'''
| + | |
- | |'''Name'''
| + | |
- | |'''Description'''
| + | |
- | |-
| + | |
- | |string
| + | |
- | |name
| + | |
- | |The username of the WikiPathways account
| + | |
- | |-
| + | |
- | |string
| + | |
- | |pass
| + | |
- | |The password of the WikiPathways account
| + | |
- | |-
| + | |
- | |colspan=3 | ''Returns''
| + | |
- | |-
| + | |
- | |colspan=2 | string
| + | |
- | | The authentication code for this session
| + | |
- | |}
| + | |
| | | |
- | === getPathwayAs ==== | + | === Libraries === |
- | Download a pathway in the specified file format.
| + | Below is a short list of libraries for popular programming languages that might help you work with the WikiPathways web service. |
- | {|class=wikitable
| + | |
- | |colspan=3 | ''Arguments''
| + | |
- | |-
| + | |
- | |'''Type'''
| + | |
- | |'''Name'''
| + | |
- | |'''Description'''
| + | |
- | |-
| + | |
- | |string
| + | |
- | |fileType
| + | |
- | |The file format. This can be one of:
| + | |
- | * gpml
| + | |
- | * png
| + | |
- | * svg
| + | |
- | * pdf
| + | |
- | * txt
| + | |
- | * pwf
| + | |
- | See [[Download_Pathways | the download page]] for an explanation of these file formats.
| + | |
- | |-
| + | |
- | |string
| + | |
- | |pwName
| + | |
- | |The pathway name
| + | |
- | |-
| + | |
- | |string
| + | |
- | |pwSpecies
| + | |
- | |The pathway species
| + | |
- | |-
| + | |
- | |integer
| + | |
- | |revision
| + | |
- | |The revision number of the pathway (use '0' for most recent version)
| + | |
- | |-
| + | |
- | |colspan=3 | ''Returns''
| + | |
- | |-
| + | |
- | |colspan=2 | base64Binary
| + | |
- | |The file contents (base64 encoded)
| + | |
- | |}
| + | |
| | | |
- | ==== updatePathway ====
| + | * R: The rWikiPathways package with vignettes at [https://bioconductor.org/packages/release/bioc/html/rWikiPathways.html bioconductor]. |
- | Update a pathway on the wiki with the given GPML code.
| + | * Java: Java API client with code examples at [https://github.com/wikipathways/wikipathways-api-client-java github]. |
- | {|class=wikitable
| + | * Perl: Perl API client with code examples at [https://github.com/wikipathways/wikipathways-api-client-perl github]. |
- | |colspan=3 | ''Arguments''
| + | * Php: Example scripts at [https://github.com/wikipathways/scripts/ github]. |
- | |-
| + | * Python: Python API client with code examples at [https://github.com/wikipathways/wikipathways-api-client-py github]. |
- | |'''Type'''
| + | |
- | |'''Name'''
| + | |
- | |'''Description'''
| + | |
- | |-
| + | |
- | |string
| + | |
- | |pwName
| + | |
- | |The pathway name
| + | |
- | |-
| + | |
- | |string
| + | |
- | |pwSpecies
| + | |
- | |The pathway species
| + | |
- | |-
| + | |
- | |string
| + | |
- | |description
| + | |
- | |A description of the modifications
| + | |
- | |-
| + | |
- | |string
| + | |
- | |gpml
| + | |
- | |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 [[Help:WikiPathways_Webservice#WSAuth|WSAuth]]
| + | |
- | |auth
| + | |
- | |The authentication info.
| + | |
- | |colspan=3 | ''Returns''
| + | |
- | |-
| + | |
- | |colspan=2 | boolean
| + | |
- | |True if the pathway was updated sucessfully.
| + | |
- | |}
| + | |
| | | |
- | ==== findPathwaysByText ==== | + | == Other Examples == |
- | Find pathways using a textual search on the description and text labels of the pathway objects.
| + | |
| | | |
- | {|class=wikitable
| + | === Groovy === |
- | |colspan=3 | ''Arguments''
| + | |
- | |-
| + | |
- | |'''Type'''
| + | |
- | |'''Name'''
| + | |
- | |'''Description'''
| + | |
- | |-
| + | |
- | |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).
| + | |
- | |-
| + | |
- | |colspan=3 | ''Returns''
| + | |
- | |-
| + | |
- | |colspan=2 | array of object [[Help:WikiPathways_Webservice#WSSearchResult|WSSearchResult]]
| + | |
- | |An array of search results.
| + | |
- | |}
| + | |
- | ==== findPathwaysByXref ==== | + | |
- | Find pathways by searching on the external references of DataNodes (gene/protein/metabolite identifiers).
| + | |
| | | |
- | {|class=wikitable
| + | [http://www.helixsoft.nl/blog/?p=153 This blog post] contains an example of how to use the WikiPathways webservice in Groovy. |
- | |colspan=3 | ''Arguments''
| + | |
- | |-
| + | |
- | |'''Type'''
| + | |
- | |'''Name'''
| + | |
- | |'''Description'''
| + | |
- | |-
| + | |
- | |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 [http://www.pathvisio.org/Help_1.1#Supported_database_systems this page] for an overview of available system codes.
| + | |
- | |-
| + | |
- | |colspan=3 | ''Returns''
| + | |
- | |-
| + | |
- | |colspan=2 | array of object [[Help:WikiPathways_Webservice#WSSearchResult|WSSearchResult]]
| + | |
- | |An array of search results.
| + | |
- | |}
| + | |
| | | |
- | === Objects === | + | == How to cite == |
- | This section explains the different object classes defined in the WSDL.
| + | Kelder T, Pico AR, Hanspers K, van Iersel MP, Evelo C, Conklin BR. (2009) '''Mining Biological Pathways Using WikiPathways Web Services.''' PLoS ONE 4(7): [http://www.plosone.org/article/info:doi/10.1371/journal.pone.0006447 doi:10.1371/journal.pone.0006447] |
- | ==== WSPathwayInfo ====
| + | |
- | Container for pathway metadata, such as name, organism and url.
| + | |
- | {|class=wikitable
| + | |
- | |colspan=3 | '''fields'''
| + | |
- | |-
| + | |
- | |name
| + | |
- | |string
| + | |
- | |The name of the pathway
| + | |
- | |-
| + | |
- | |species
| + | |
- | |string
| + | |
- | |The species (organism) of the pathway
| + | |
- | |-
| + | |
- | |url
| + | |
- | |string
| + | |
- | |The url to the pathway
| + | |
- | |-
| + | |
- | |revision
| + | |
- | |string
| + | |
- | |The revision number of the pathway ('0' can be used for the most recent revision)
| + | |
- | |}
| + | |
| | | |
- | ==== WSPathway ====
| + | ----- |
- | '''Extends WSPathwayInfo'''.
| + | <p>[[:Help:Contents|Return to Help Contents]]</p> |
- | | + | |
- | Container for pathway metadata and content. This object inherits all fields from WSPathwayInfo and
| + | |
- | has one additional field:
| + | |
- | {|class=wikitable
| + | |
- | |colspan=3 | '''fields'''
| + | |
- | |-
| + | |
- | |gpml
| + | |
- | |string
| + | |
- | |The content of the pathway (as [http://www.pathvisio.org/EverythingGPML GPML]).
| + | |
- | |}
| + | |
- | | + | |
- | ==== WSAuth ====
| + | |
- | Container for authentication data for a logged in WikiPathways session.
| + | |
- | {|class=wikitable
| + | |
- | |colspan=3 | '''fields'''
| + | |
- | |-
| + | |
- | |user
| + | |
- | |string
| + | |
- | |The username of a WikiPathways account
| + | |
- | |-
| + | |
- | |key
| + | |
- | |string
| + | |
- | |The authentication key of the session (can be obtained by calling the login function).
| + | |
- | |}
| + | |
- | | + | |
- | ==== WSSearchResult ====
| + | |
- | Container for a single search result.
| + | |
- | {|class=wikitable
| + | |
- | |colspan=3 | '''fields'''
| + | |
- | |-
| + | |
- | |score
| + | |
- | |double
| + | |
- | |The score of the search result
| + | |
- | |-
| + | |
- | |fields
| + | |
- | |array of object WSIndexField
| + | |
- | |An array of index fields that were returned with the search. The included fields may vary among different search functions.
| + | |
- | |}
| + | |
- | | + | |
- | ==== WSIndexField ====
| + | |
- | Container for a single index field.
| + | |
- | {|class=wikitable
| + | |
- | |colspan=3 | '''fields'''
| + | |
- | |-
| + | |
- | |name
| + | |
- | |string
| + | |
- | |The name of the index field.
| + | |
- | |-
| + | |
- | |fields
| + | |
- | |array of string
| + | |
- | |An array with the value(s) of the field.
| + | |
- | |}
| + | |