Package 'gson'

Title: Base Class and Methods for 'gson' Format
Description: Proposes a new file format ('gson') for storing gene set and related information, and provides read, write and other utilities to process this file format.
Authors: Guangchuang Yu [aut, cre, cph]
Maintainer: Guangchuang Yu <[email protected]>
License: Artistic-2.0
Version: 0.1.0
Built: 2024-10-30 02:43:57 UTC
Source: https://github.com/cran/gson

Help Index


construct a 'GSON' object

Description

construct a 'GSON' object

Usage

gson(
  gsid2gene,
  gsid2name = NULL,
  gene2name = NULL,
  species = NULL,
  gsname = NULL,
  version = NULL,
  accessed_date = NULL,
  keytype = 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

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

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)

Class "GSON" This class represents gene set information.

Description

Class "GSON" This class represents gene set information.

Slots

gsid2gene

data.frame with two columns of 'gsid' and 'gene'

gsid2name

data.frame with two columns of 'gsid' and 'name'

gene2name

data.frame with two columns of 'gene' and 'name'

species

species of the annotation

gsname

gene set name, e.g., GO, KEGG

version

version of the gene set

accessed_date

time to obtain the gene set data

keytype

keytype of genes

info

extra information

Author(s)

Guangchuang Yu https://yulab-smu.top


construct a 'GSONList' object

Description

construct a 'GSONList' object

Usage

gsonList(...)

Arguments

...

input GSON objects

Value

A 'GSONList' instance


read.gmt

Description

parse gmt file to a data.frame

Usage

read.gmt(gmtfile)

read.gmt.wp(gmtfile, output = "data.frame")

Arguments

gmtfile

gmt file

output

one of 'data.frame' or 'GSON'

Value

data.frame

Author(s)

Guangchuang Yu


read and write gson file

Description

read and write gson file

Usage

read.gson(file)

write.gson(x, file = "")

Arguments

file

A gson file

x

A GSON instance

Value

A GSON instance

Examples

wpfile <- system.file('extdata', "wikipathways-20220310-gmt-Homo_sapiens.gmt", package='gson')
x <- read.gmt.wp(wpfile, output = "GSON")
f = tempfile(fileext = '.gson')
write.gson(x, f)
read.gson(f)

show method

Description

show method for GSON instance

Usage

show(object)

Arguments

object

A GSON object

Value

message

Author(s)

Guangchuang Yu https://yulab-smu.top