gson: construct a 'GSON' object

View source: R/gson.R

gsonR Documentation

construct a 'GSON' object

Description

construct a 'GSON' object

Usage

gson(
  gsid2gene,
  gsid2name = NULL,
  gene2name = NULL,
  schema_version = "1.0",
  species = NULL,
  gsname = NULL,
  version = NULL,
  accessed_date = NULL,
  keytype = NULL,
  urlpattern = NULL,
  info = NULL
)

Arguments

gsid2gene

A data frame with first column of gene set IDs and second column of genes

gsid2name

A data frame with first column of gene set IDs and second column of gene set names

gene2name

A data frame with first column of genes and second column of gene symbols

schema_version

GSON file schema version

species

Which species of the genes belongs to

gsname

Name of the gene set (e.g., GO, KEGG, etc.)

version

version of the gene set

accessed_date

date to obtain the gene set data

keytype

keytype of genes

urlpattern

URL pattern

info

extra information

Value

A 'GSON' instance

Examples

wpfile <- system.file('extdata', "wikipathways-20220310-gmt-Homo_sapiens.gmt", package='gson')
x <- read.gmt.wp(wpfile)
gsid2gene <- data.frame(gsid=x$wpid, gene=x$gene)
gsid2name <- unique(data.frame(gsid=x$wpid, name=x$name))
species <- unique(x$species)
version <- unique(x$version)
gson(gsid2gene=gsid2gene, gsid2name=gsid2name, species=species, version=version)

gson documentation built on July 2, 2026, 1:06 a.m.