https://github.com/kevinrue/unisets
Collection of classes to store gene sets.
https://github.com/kevinrue/unisets
bioconductor-package classes-and-objects genesets r s4 structured-data
Last synced: 4 months ago
JSON representation
Collection of classes to store gene sets.
- Host: GitHub
- URL: https://github.com/kevinrue/unisets
- Owner: kevinrue
- License: other
- Created: 2019-01-15T12:26:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-11T22:11:07.000Z (almost 6 years ago)
- Last Synced: 2025-02-10T14:11:46.282Z (about 1 year ago)
- Topics: bioconductor-package, classes-and-objects, genesets, r, s4, structured-data
- Language: R
- Homepage: http://kevinrue.github.io/unisets
- Size: 965 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/kevinrue/unisets)
[](https://codecov.io/github/kevinrue/unisets?branch=master)
[](https://github.com/kevinrue/unisets/actions)
# unisets
The goal of the [_unisets_](https://github.com/kevinrue/unisets) package is to provide a collection of S4 classes to store relationships between elements and sets, with a particular emphasis on gene sets.
## Installation
You can install the released version of unisets from [GitHub](https://github.com/kevinrue/unisets) with:
``` r
devtools::install_github("kevinrue/unisets")
```
To compile the vignette as well, please use the following command:
``` r
devtools::install_github("kevinrue/unisets", build_opts = c("--no-resave-data", "--no-manual"))
```
## Example
This is a basic example which shows you how to create a `Sets` object, to store simple associations between genes and sets:
``` r
library(unisets)
sets_list <- list(
set1 = c("A", "B"),
set2 = c("B", "C", "D")
)
relations_table <- DataFrame(
element = unlist(sets_list),
set = rep(names(sets_list), lengths(sets_list)),
extra1 = rep(c("ABC", "DEF"), c(3L, 2L)),
extra2 = seq(0, 1, length.out = 5L)
)
element_data <- IdVector(c("A", "B", "C", "D"))
elementMetadata(element_data) <- DataFrame(
stat1 = c( 1, 2, 3, 4 ),
info1 = c("a", "b", "c", "d")
)
set_data <- IdVector(c("set1", "set2"))
elementMetadata(set_data) <- DataFrame(
stat1 = c( 100, 200 ),
info1 = c("abc", "def")
)
base_set <- Sets(relations_table, element_data, set_data)
base_set
```
```
Sets with 5 relations between 4 elements and 2 sets
element set | extra1 extra2
|
[1] A set1 | ABC 0
[2] B set1 | ABC 0.25
[3] B set2 | ABC 0.5
[4] C set2 | DEF 0.75
[5] D set2 | DEF 1
-----------
elementInfo: IdVector with 2 metadata (stat1, info1)
setInfo: IdVector with 2 metadata (stat1, info1)
```