gson_url: URLs of the gene sets of a GSON

View source: R/utilities.r

gson_urlR Documentation

URLs of the gene sets of a GSON

Description

gson_url() substitutes each gene set ID into the {gsid} token of x@urlpattern, and browseGS() opens the resulting URL in a browser. The URL only comes from the object itself: gson ships no table of other databases' websites, so a producer that wants its gene sets to be browsable has to declare urlpattern.

Usage

gson_url(x, gsid = NULL)

browseGS(x, gsid, ...)

Arguments

x

A GSON object

gsid

Gene set IDs to build URLs for. Defaults to names(x), i.e. every gene set in the object.

...

Further arguments passed to utils::browseURL().

Value

gson_url() a named character vector of URLs, every entry NA_character_ and a warning when the object carries no urlpattern. browseGS() returns NULL invisibly.

Examples

wpfile <- system.file('extdata', "wikipathways-20220310-gmt-Homo_sapiens.gmt", package='gson')
wp <- read.gmt.wp(wpfile, output = "GSON")
gson_url(wp)[1:2]
gson_url(wp, c("WP100", "WP106"))
# browseGS(wp, "WP100") opens the same URL in a browser

gson documentation built on Oct. 9, 2026, 5:09 p.m.