| Title: | Base Class and Methods for 'gson' Format |
| Version: | 0.1.0 |
| 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. |
| Imports: | jsonlite, methods, rlang, stats, tidyr, utils |
| ByteCompile: | true |
| License: | Artistic-2.0 |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.2.3 |
| NeedsCompilation: | no |
| Packaged: | 2023-03-07 04:04:14 UTC; ygc |
| Author: | Guangchuang Yu |
| Maintainer: | Guangchuang Yu <guangchuangyu@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2023-03-07 04:20:02 UTC |
Class "GSON" This class represents gene set information.
Description
Class "GSON" This class represents gene set information.
Slots
gsid2genedata.frame with two columns of 'gsid' and 'gene'
gsid2namedata.frame with two columns of 'gsid' and 'name'
gene2namedata.frame with two columns of 'gene' and 'name'
speciesspecies of the annotation
gsnamegene set name, e.g., GO, KEGG
versionversion of the gene set
accessed_datetime to obtain the gene set data
keytypekeytype of genes
infoextra information
Author(s)
Guangchuang Yu https://yulab-smu.top
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)
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 |
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 |
Value
message
Author(s)
Guangchuang Yu https://yulab-smu.top