Skip to contents

Convert GSEABase classes to a TidySet

Usage

tidy(object)

# S3 method for GeneSetCollection
tidy(object)

# S3 method for GeneSet
tidy(object)

Arguments

object

A GeneSetCollection or a GeneSet derived object

Value

A TidySet object.

Methods (by class)

  • tidy(GeneSetCollection): Converts to a tidySet given a GeneSetCollection

  • tidy(GeneSet): Converts to a tidySet given a GeneSet

Examples

# Needs GSEABase pacakge from Bioconductor
if (requireNamespace("GSEABase", quietly = TRUE)) {
    library("GSEABase")
    gs <- GeneSet()
    gs
    tidy(gs)
    fl <- system.file("extdata", "Broad.xml", package="GSEABase")
    gs2 <- getBroadSets(fl) # actually, a list of two gene sets
    TS <- tidy(gs2)
    dim(TS)
    sets(TS)
}
#> Loading required package: BiocGenerics
#> 
#> Attaching package: ‘BiocGenerics’
#> The following object is masked from ‘package:BaseSet’:
#> 
#>     union
#> The following objects are masked from ‘package:stats’:
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from ‘package:base’:
#> 
#>     Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
#>     as.data.frame, basename, cbind, colnames, dirname, do.call,
#>     duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
#>     lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
#>     pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
#>     tapply, union, unique, unsplit, which.max, which.min
#> Loading required package: Biobase
#> Welcome to Bioconductor
#> 
#>     Vignettes contain introductory material; view with
#>     'browseVignettes()'. To cite Bioconductor, see
#>     'citation("Biobase")', and for packages 'citation("pkgname")'.
#> Loading required package: annotate
#> Loading required package: AnnotationDbi
#> Loading required package: stats4
#> Loading required package: IRanges
#> Loading required package: S4Vectors
#> 
#> Attaching package: ‘S4Vectors’
#> The following object is masked from ‘package:BaseSet’:
#> 
#>     active
#> The following object is masked from ‘package:utils’:
#> 
#>     findMatches
#> The following objects are masked from ‘package:base’:
#> 
#>     I, expand.grid, unname
#> 
#> Attaching package: ‘AnnotationDbi’
#> The following object is masked from ‘package:BaseSet’:
#> 
#>     select
#> Loading required package: XML
#> Loading required package: graph
#> 
#> Attaching package: ‘graph’
#> The following object is masked from ‘package:XML’:
#> 
#>     addNode
#> The following objects are masked from ‘package:BaseSet’:
#> 
#>     complement, intersection
#> 
#> Attaching package: ‘GSEABase’
#> The following object is masked from ‘package:BaseSet’:
#> 
#>     incidence
#>       sets Identifier                    shortDescripton
#> 1  chr5q23     c1:101  Genes in cytogenetic band chr5q23
#> 2 chr16q24     c1:102 Genes in cytogenetic band chr16q24
#>                      longDescription organism
#> 1  Genes in cytogenetic band chr5q23    Human
#> 2 Genes in cytogenetic band chr16q24    Human
#>                                                 urls.getBroadSet
#> 1 file://usr/local/lib/R/site-library/GSEABase/extdata/Broad.xml
#> 2 file://usr/local/lib/R/site-library/GSEABase/extdata/Broad.xml
#>                                                    urls2     contributor  type
#> 1 http://www.broad.mit.edu/gsea/msigdb/cards/chr5q23.xml Broad Institute Broad
#> 2 http://genome.ucsc.edu/cgi-bin/hgTracks?position=16q24 Broad Institute Broad
#>                                                   urls3
#> 1 http://genome.ucsc.edu/cgi-bin/hgTracks?position=5q23
#> 2                                                  <NA>