Title: | rWikiPathways - R client library for the WikiPathways API |
---|---|
Description: | Use this package to interface with the WikiPathways API. It provides programmatic access to WikiPathways content in multiple data and image formats, including official monthly release files and convenient GMT read/write functions. |
Authors: | Egon Willighagen [aut, cre] , Alex Pico [aut] |
Maintainer: | Egon Willighagen <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.27.0 |
Built: | 2024-11-23 06:20:24 UTC |
Source: | https://github.com/bioc/rWikiPathways |
Access the monthly archives of pathway content from WikiPathways.
downloadPathwayArchive( date = "current", organism = NULL, format = c("gpml", "gmt", "svg"), destpath = "./" )
downloadPathwayArchive( date = "current", organism = NULL, format = c("gpml", "gmt", "svg"), destpath = "./" )
date |
(optional) The timestamp for a monthly release (e.g., 20171010) or "current" (default) for latest release. |
organism |
(optional) A particular species. See listOrganisms. |
format |
(optional) Either gpml (default), gmt or svg. |
destpath |
(optional) Destination path for file to be downloaded to. Default is current workding directory. |
If you do not specify an organism, then an archive file will not be downloaded. Rather, the archive will be opened in a tab in your default browser.
Filename of downloaded file or an opened tab in default browser
readPathwayGMT
#downloadPathwayArchive() ## open in browser #downloadPathwayArchive(format="gmt") ## open in browser #downloadPathwayArchive(date="20230710", format="svg") ## open in browser #downloadPathwayArchive(date="20230710", organism="Mus musculus", format="svg") ## download file #downloadPathwayArchive(organism="Mus musculus") ## download file
#downloadPathwayArchive() ## open in browser #downloadPathwayArchive(format="gmt") ## open in browser #downloadPathwayArchive(date="20230710", format="svg") ## open in browser #downloadPathwayArchive(date="20230710", organism="Mus musculus", format="svg") ## download file #downloadPathwayArchive(organism="Mus musculus") ## download file
Retrieve list of pathway WPIDs containing the query citation.
findPathwayIdsByLiterature(query = NULL)
findPathwayIdsByLiterature(query = NULL)
query |
The |
A list
of WPIDs
findPathwaysByLiterature
{ findPathwayIdsByLiterature('19649250') findPathwayIdsByLiterature('smith') findPathwayIdsByLiterature('cancer') }
{ findPathwayIdsByLiterature('19649250') findPathwayIdsByLiterature('smith') findPathwayIdsByLiterature('cancer') }
Retrieve list of pathway WPIDs containing the query ORCID
findPathwayIDsByOrcid(query = NULL)
findPathwayIDsByOrcid(query = NULL)
query |
The |
A list
of WPIDs
findPathwaysByOrcid
{ findPathwayIDsByOrcid(' 0000-0001-9773-4008') }
{ findPathwayIDsByOrcid(' 0000-0001-9773-4008') }
Retrieve list of pathway WPIDs containing the query text.
findPathwayIdsByText(query = NULL, field = NULL)
findPathwayIdsByText(query = NULL, field = NULL)
query |
A |
field |
Optional |
A list
of WPIDs
findPathwaysByText
{ findPathwayIdsByText('cancer') }
{ findPathwayIdsByText('cancer') }
Retrieve list of pathway WPIDs containing the query Xref by identifier and system code.
findPathwayIdsByXref(identifier = NULL, systemCode = NULL)
findPathwayIdsByXref(identifier = NULL, systemCode = NULL)
identifier |
( |
systemCode |
( |
A list
of WPIDs
findPathwaysByXref
{ findPathwayIdsByXref('ENSG00000100031','En') }
{ findPathwayIdsByXref('ENSG00000100031','En') }
Retrieve list of pathway names containing the query citation.
findPathwayNamesByLiterature(query = NULL)
findPathwayNamesByLiterature(query = NULL)
query |
The |
A list
of lists
findPathwaysByLiterature
{ findPathwayNamesByLiterature('19649250') findPathwayNamesByLiterature('smith') findPathwayNamesByLiterature('cancer') }
{ findPathwayNamesByLiterature('19649250') findPathwayNamesByLiterature('smith') findPathwayNamesByLiterature('cancer') }
Retrieve list of pathway names containing the query ORCID
findPathwayNamesByOrcid(query = NULL)
findPathwayNamesByOrcid(query = NULL)
query |
The |
A list
of lists
findPathwaysByOrcid
{ findPathwayNamesByOrcid(' 0000-0001-9773-4008') }
{ findPathwayNamesByOrcid(' 0000-0001-9773-4008') }
Retrieve list of pathway names containing the query text.
findPathwayNamesByText(query = NULL, field = NULL)
findPathwayNamesByText(query = NULL, field = NULL)
query |
A |
field |
Optional |
A list
of pathway names
findPathwaysByText
{ findPathwayNamesByText('cancer') }
{ findPathwayNamesByText('cancer') }
Retrieve list of pathway names containing the query Xref by identifier and system code.
findPathwayNamesByXref(identifier = NULL, systemCode = NULL)
findPathwayNamesByXref(identifier = NULL, systemCode = NULL)
identifier |
( |
systemCode |
( |
A list
of lists
findPathwaysByXref
{ findPathwayNamesByXref('ENSG00000100031','En') }
{ findPathwayNamesByXref('ENSG00000100031','En') }
Retrieve pathways containing the query citation.
findPathwaysByLiterature(query = NULL)
findPathwaysByLiterature(query = NULL)
query |
The |
A dataframe
of pathway attributes including the matching
citations
{ findPathwaysByLiterature('15134803') findPathwaysByLiterature('Schwartz GL') findPathwaysByLiterature('Eur J Pharmacol') findPathwaysByLiterature('antihypertensive drug responses') }
{ findPathwaysByLiterature('15134803') findPathwaysByLiterature('Schwartz GL') findPathwaysByLiterature('Eur J Pharmacol') findPathwaysByLiterature('antihypertensive drug responses') }
Retrieve pathways containing the query ORCID
findPathwaysByOrcid(query = NULL)
findPathwaysByOrcid(query = NULL)
query |
The |
A dataframe
of pathway attributes including the matching
ORCIDs
{ findPathwaysByOrcid(' 0000-0001-9773-4008') }
{ findPathwaysByOrcid(' 0000-0001-9773-4008') }
Retrieve pathways matching the query text.
findPathwaysByText(query = NULL, field = NULL)
findPathwaysByText(query = NULL, field = NULL)
query |
A |
field |
Optional |
Searches id, name, description, species, revision date, authors, datanode labels, ontology annotations, and citedIn (e.g., PMCIDs).
A dataframe
of pathway attributes including the matching
attributes
{ findPathwaysByText('cancer') findPathwaysByText('cancer','name') }
{ findPathwaysByText('cancer') findPathwaysByText('cancer','name') }
Retrieve pathways containing the query Xref by identifier and system code.
findPathwaysByXref(identifier = NULL, systemCode = NULL)
findPathwaysByXref(identifier = NULL, systemCode = NULL)
identifier |
( |
systemCode |
( |
A dataframe
of pathway attributes including the matching
identifiers
{ findPathwaysByXref('ENSG00000100031','En') }
{ findPathwaysByXref('ENSG00000100031','En') }
Retrieve list of pathway URLs containing the query citation.
findPathwayUrlsByLiterature(query = NULL)
findPathwayUrlsByLiterature(query = NULL)
query |
The |
A list
of lists
findPathwaysByLiterature
{ findPathwayUrlsByLiterature('19649250') findPathwayUrlsByLiterature('smith') findPathwayUrlsByLiterature('cancer') }
{ findPathwayUrlsByLiterature('19649250') findPathwayUrlsByLiterature('smith') findPathwayUrlsByLiterature('cancer') }
Retrieve list of pathway URLs containing the query ORCID
findPathwayUrlsByOrcid(query = NULL)
findPathwayUrlsByOrcid(query = NULL)
query |
The |
A list
of lists
findPathwaysByOrcid
{ findPathwayUrlsByOrcid(' 0000-0001-9773-4008') }
{ findPathwayUrlsByOrcid(' 0000-0001-9773-4008') }
Retrieve list of pathway URLs containing the query text.
findPathwayUrlsByText(query = NULL, field = NULL)
findPathwayUrlsByText(query = NULL, field = NULL)
query |
A |
field |
Optional |
A list
of urls
findPathwaysByText
{ findPathwayUrlsByText('cancer') }
{ findPathwayUrlsByText('cancer') }
Retrieve list of pathway URLs containing the query Xref by identifier and system code.
findPathwayUrlsByXref(identifier = NULL, systemCode = NULL)
findPathwayUrlsByXref(identifier = NULL, systemCode = NULL)
identifier |
( |
systemCode |
( |
A list
of lists
findPathwaysByXref
{ findPathwayUrlsByXref('ENSG00000100031','En') }
{ findPathwayUrlsByXref('ENSG00000100031','En') }
Retrieve information about various total counts at WikiPathways.
getCounts()
getCounts()
A data.frame
of counts
{ getCounts() }
{ getCounts() }
Retrieve information about curation status for a specific pathway.
getCurationStatus(pathway)
getCurationStatus(pathway)
pathway |
WikiPathways identifier (WPID) for the pathway, e.g. WP554 |
A data.frame
of status details
{ getCurationStatus('WP554') }
{ getCurationStatus('WP554') }
This function is provided for compatibility with older web services only and will be defunct at the next release.
getCurationTagNames(pathway)
getCurationTagNames(pathway)
pathway |
WikiPathways identifier (WPID) for the pathway to download, e.g. WP4 |
A list
of tag names
This function is provided for compatibility with older web services only and will be defunct at the next release.
getCurationTags(pathway)
getCurationTags(pathway)
pathway |
WikiPathways identifier (WPID) for the pathway to download, e.g. WP4 |
A list
of tag name, display name, revision, text, timestampe and user
This function is provided for compatibility with older web services only and will be defunct at the next release.
getEveryCurationTag(tag)
getEveryCurationTag(tag)
tag |
( |
A list
of tag name, display name, revision, text, timestampe and user
Retrieve identifiers of ontology terms for a specific pathway.
getOntologyTermIds(pathway = NULL)
getOntologyTermIds(pathway = NULL)
pathway |
WikiPathways identifier (WPID) for the pathway to download, e.g. WP4 |
A list
of term identifiers
{ getOntologyTermIds('WP554') }
{ getOntologyTermIds('WP554') }
Retrieve names of ontology terms for a specific pathway.
getOntologyTermNames(pathway = NULL)
getOntologyTermNames(pathway = NULL)
pathway |
WikiPathways identifier (WPID) for the pathway to download, e.g. WP4 |
A list
of term names
{ getOntologyTermNames('WP554') }
{ getOntologyTermNames('WP554') }
Retrieve information about ontology terms for a specific pathway.
getOntologyTerms(pathway = NULL)
getOntologyTerms(pathway = NULL)
pathway |
WikiPathways identifier (WPID) for the pathway, e.g. WP554. If NULL, then ontology term information for all pathways is returned. |
A data.frame
pathway id and term information
{ getOntologyTerms('WP554') }
{ getOntologyTerms('WP554') }
Retrieve a specific pathway in the GPML format
getPathway(pathway, revision = 0)
getPathway(pathway, revision = 0)
pathway |
WikiPathways identifier (WPID) for the pathway to retrieve, e.g. WP554 |
revision |
<ignored> Only the latest version is available. |
GPML as string
{ getPathway('WP554') }
{ getPathway('WP554') }
View the revision history of a pathway.
getPathwayHistory(pathway = NULL, timestamp = NULL)
getPathwayHistory(pathway = NULL, timestamp = NULL)
pathway |
WikiPathways identifier (WPID) for the pathway, e.g. WP554 |
timestamp |
<ignored> |
Opens the GitHub history for a pathway
#getPathwayHistory('WP554')
#getPathwayHistory('WP554')
Retrieve the list of pathway IDs per community
getPathwayIdsByCommunity(community_tag = NULL)
getPathwayIdsByCommunity(community_tag = NULL)
community_tag |
Abbreviated name of community |
A list
of pathway IDs
{ getPathwayIdsByCommunity("AOP") }
{ getPathwayIdsByCommunity("AOP") }
This function is provided for compatibility with older web services only and will be defunct at the next release.
getPathwayIdsByCurationTag(tag)
getPathwayIdsByCurationTag(tag)
tag |
( |
A list
of pathway WPIDs
Retrieve pathway WPIDs for every pathway with a given ontology term.
getPathwayIdsByOntologyTerm(term = NULL)
getPathwayIdsByOntologyTerm(term = NULL)
term |
( |
A list
of pathway WPIDs
{ getPathwayIdsByOntologyTerm('PW:0000045') }
{ getPathwayIdsByOntologyTerm('PW:0000045') }
Retrieve pathway WPIDs for every pathway with a child term of given ontology term
getPathwayIdsByParentOntologyTerm(term = NULL)
getPathwayIdsByParentOntologyTerm(term = NULL)
term |
( |
A list
of pathway WPIDs
{ getPathwayIdsByParentOntologyTerm('signaling pathway') }
{ getPathwayIdsByParentOntologyTerm('signaling pathway') }
Retrieve information for a specific pathway
getPathwayInfo(pathway = NULL)
getPathwayInfo(pathway = NULL)
pathway |
WikiPathways identifier (WPID) for the pathway to download, e.g. WP554. If NULL, then all pathways are returned. |
A dataframe
of pathway WPID, URL, name, species, revision,
authors, description, and citedIn
{ getPathwayInfo('WP554') }
{ getPathwayInfo('WP554') }
Retrieve the list of pathway names per community
getPathwayNamesByCommunity(community_tag = NULL)
getPathwayNamesByCommunity(community_tag = NULL)
community_tag |
Abbreviated name of community |
A list
of pathway names
{ getPathwayNamesByCommunity("AOP") }
{ getPathwayNamesByCommunity("AOP") }
Retrieve pathways per community
getPathwaysByCommunity(community_tag = NULL)
getPathwaysByCommunity(community_tag = NULL)
community_tag |
Abbreviated name of community |
A data.frame
of pathway information
{ getPathwaysByCommunity("AOP") }
{ getPathwaysByCommunity("AOP") }
This function is provided for compatibility with older web services only and will be defunct at the next release.
getPathwaysByCurationTag(tag)
getPathwaysByCurationTag(tag)
tag |
( |
A list
of pathway information, including WPID, url, name, species and revision
Retrieve pathway information for every pathway with a given ontology term.
getPathwaysByOntologyTerm(term = NULL)
getPathwaysByOntologyTerm(term = NULL)
term |
( |
A data.frame
of pathway information
{ getPathwaysByOntologyTerm('PW:0000045') }
{ getPathwaysByOntologyTerm('PW:0000045') }
Retrieve pathway information for every pathway with a child term of given ontology term.
getPathwaysByParentOntologyTerm(term = NULL)
getPathwaysByParentOntologyTerm(term = NULL)
term |
( |
A data.frame
of pathway information
{ getPathwaysByParentOntologyTerm('signaling pathway') }
{ getPathwaysByParentOntologyTerm('signaling pathway') }
Retrieve the list of pathway URLs per community
getPathwayUrlsByCommunity(community_tag = NULL)
getPathwayUrlsByCommunity(community_tag = NULL)
community_tag |
Abbreviated name of community |
A list
of pathway URLs
{ getPathwayUrlsByCommunity("AOP") }
{ getPathwayUrlsByCommunity("AOP") }
Retrieve recently changed pathways at WikiPathways.
getRecentChanges(timestamp = NULL)
getRecentChanges(timestamp = NULL)
timestamp |
(8 digits, YYYYMMDD) Limit by time, only pathways changed after the given date, e.g., 20180201 for changes since Feb 1st, 2018. |
A data.frame
of recently changed pathways, including id, name,
url, species and revision
{ getRecentChanges('20180201') }
{ getRecentChanges('20180201') }
Retrieve WPIDs of recently changed pathways at WikiPathways.
getRecentChangesIds(timestamp)
getRecentChangesIds(timestamp)
timestamp |
(8 digits, YYYYMMDD) Limit by time, only pathways changed after the given date, e.g., 20180201 for changes since Feb 1st, 2018. |
A list
of WPIDs
{ getRecentChangesIds('20180201') }
{ getRecentChangesIds('20180201') }
Retrieve names of recently changed pathways at WikiPathways.
getRecentChangesNames(timestamp)
getRecentChangesNames(timestamp)
timestamp |
(8 digits, YYYYMMDD) Limit by time, only pathways changed after the given date, e.g., 20180201 for changes since Feb 1st, 2018. |
A list
of pathway names. Note: pathway deletions will be listed as blank names.
{ getRecentChangesNames('20180201') }
{ getRecentChangesNames('20180201') }
Retrieve the Xref identifiers for a specific pathway in a particular system code
getXrefList(pathway = NULL, systemCode = NULL, compact = FALSE)
getXrefList(pathway = NULL, systemCode = NULL, compact = FALSE)
pathway |
WikiPathways identifier (WPID) for the pathway to download, e.g. WP554 |
systemCode |
( |
compact |
( |
A list
of Xrefs identifiers
{ xrefs = getXrefList("WP2338", "L") }
{ xrefs = getXrefList("WP2338", "L") }
Retrieve the list of communities hosted by WikiPathways
listCommunities()
listCommunities()
A data.frame
of community information
{ listCommunities() }
{ listCommunities() }
Retrieve the list of organisms supported by WikiPathways
listOrganisms()
listOrganisms()
A list
of organisms
{ listOrganisms() }
{ listOrganisms() }
Retrieve list of pathway WPIDs per species.
listPathwayIds(organism = "")
listPathwayIds(organism = "")
organism |
( |
Basically returns a subset of listPathways result
A list
of WPIDs
listPathways
{ listPathwayIds('Mus musculus') }
{ listPathwayIds('Mus musculus') }
Retrieve list of pathway names per species.
listPathwayNames(organism = "")
listPathwayNames(organism = "")
organism |
( |
Basically returns a subset of listPathways result
A list
of names
listPathways
{ listPathwayNames('Mus musculus') }
{ listPathwayNames('Mus musculus') }
Retrieve list of pathways per species, including WPID, name, species, URL and latest revision number.
listPathways(organism = "")
listPathways(organism = "")
organism |
( |
A dataframe
of pathway information
{ listPathways('Mus musculus') }
{ listPathways('Mus musculus') }
Retrieve list of pathway URLs per species.
listPathwayUrls(organism = "")
listPathwayUrls(organism = "")
organism |
( |
Basically returns a subset of listPathways result
A list
of URLs
listPathways
{ listPathwayUrls('Mus musculus') }
{ listPathwayUrls('Mus musculus') }
Reads any generic GMT file to produce a data frame of term-gene associations useful in enrichment analyses and other applications.
readGMT(file)
readGMT(file)
file |
Path to GMT file |
The returned data frame includes only terms and genes. If you want another data frame with terms and names, then see readGMTnames.
Data frame of term-gene associations
readGMTnames
#readGMT(system.file("extdata","my_gmt_file.gmt", package="rWikiPathways")) #readGMT("path_to_your_gmt_file.gmt")
#readGMT(system.file("extdata","my_gmt_file.gmt", package="rWikiPathways")) #readGMT("path_to_your_gmt_file.gmt")
Reads any generic GMT file to produce a data frame of term-name associations useful in enrichment analyses and other applications.
readGMTnames(file)
readGMTnames(file)
file |
Path to GMT file |
The returned data frame includes only terms and names. If you want another data frame with terms and genes, then see readGMT.
Data frame of term-namee associations
readGMT
#readGMTnames(system.file("extdata","my_gmt_file.gmt", package="rWikiPathways")) #readGMTnames("path_to_your_gmt_file.gmt")
#readGMTnames(system.file("extdata","my_gmt_file.gmt", package="rWikiPathways")) #readGMTnames("path_to_your_gmt_file.gmt")
Reads a WikiPathways GMT file to produce a data frame of pathway-gene associations useful in enrichment analyses and other applications.
readPathwayGMT(file)
readPathwayGMT(file)
file |
Path to GMT file |
The returned data frame includes pathway name, version, identifier,
and organism. The gene content is provided as NCBI Entrez Gene identifiers.
The input file can be retrieved by using
downloadPathwayArchive(organism="Homo sapiens",format="gmt")
.
Data frame of pathway-gene associations
Adapted from the generic GMT reader provided by clusterProfiler, https://github.com/YuLab-SMU/clusterProfiler/blob/master/R/GMT.R
downloadPathwayArchive
#readPathwayGMT(system.file("extdata", # "wikipathways-20201010-gmt-Homo_sapiens.gmt", package="rWikiPathways"))
#readPathwayGMT(system.file("extdata", # "wikipathways-20201010-gmt-Homo_sapiens.gmt", package="rWikiPathways"))
This function is provided for compatibility with older web services only and will be defunct at the next release.
wikipathwaysAPI(base.url = .baseUrl)
wikipathwaysAPI(base.url = .baseUrl)
base.url |
(optional) Ignore unless you need to specify a custom domain. |
New tab in default browser
This function is provided for compatibility with older web services only and will be defunct at the next release.
wikipathwaysGET( operation, parameters = NULL, format = c("json", "xml", "html", "jpg", "pdf", "dump"), base.url = .baseUrl )
wikipathwaysGET( operation, parameters = NULL, format = c("json", "xml", "html", "jpg", "pdf", "dump"), base.url = .baseUrl )
operation |
A |
parameters |
A named |
format |
( |
base.url |
(optional) Ignore unless you need to specify a custom domain. |
query result content
Writes a GMT (Gene Matrix Transposed) file from a data frame.
writeGMT(df, outfile)
writeGMT(df, outfile)
df |
Data frame with columns ordered as Identifiers, optional Description column and Genes. Identifiers must be first and Genes must be last. |
outfile |
Path to output GMT file |
The input data frame must include at least two columns: Identifiers (first column) and Genes (last column). The Identifiers will be duplicated to fill the Description column in the output GMT file if none is provided. If more than three columns are provided, then the first n columns will be concatenated with number of columns.
None
Adapted from the GMT writer in MAGeCKFlute, https://github.com/WubingZhang/MAGeCKFlute/blob/master/R/readGMT.R
readPathwayGMT
#my.df <- data.frame(id=c("WP1000","WP1000","WP1000","WP1001","WP1001"), # description=c("cancer","cancer","cancer","diabetes","diabetes"), # gene=c("574413","2167","4690","5781","11184")) #writeGMT(my.df, "my_gmt_file.gmt")
#my.df <- data.frame(id=c("WP1000","WP1000","WP1000","WP1001","WP1001"), # description=c("cancer","cancer","cancer","diabetes","diabetes"), # gene=c("574413","2167","4690","5781","11184")) #writeGMT(my.df, "my_gmt_file.gmt")