-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
107 lines (72 loc) · 2.79 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# MultimodalExperiment
<!-- badges: start -->
[![code quality](https://img.shields.io/codefactor/grade/github/schifferl/MultimodalExperiment)](https://www.codefactor.io/repository/github/schifferl/MultimodalExperiment)
<!-- badges: end -->
MultimodalExperiment is an S4 class that integrates bulk and single-cell experiment data; it is optimally storage-efficient, and its methods are exceptionally fast. It effortlessly represents multimodal data of any nature and features normalized experiment, subject, sample, and cell annotations, which are related to underlying biological experiments through maps. Its coordination methods are opt-in and employ database-like join operations internally to deliver fast and flexible management of multimodal data.
## Installation
To install `r BiocStyle::Biocpkg("MultimodalExperiment")` from Bioconductor, use `r BiocStyle::CRANpkg("BiocManager")` as follows.
```{r, eval = FALSE}
BiocManager::install("MultimodalExperiment")
```
To install `r BiocStyle::Biocpkg("MultimodalExperiment")` from GitHub, use `r BiocStyle::CRANpkg("BiocManager")` as follows.
```{r, eval = FALSE}
BiocManager::install("schifferl/MultimodalExperiment", dependencies = TRUE, build_vignettes = TRUE)
```
Most users should simply install `r BiocStyle::Biocpkg("MultimodalExperiment")` from Bioconductor.
## Cheat Sheet
[![](MultimodalExperiment.png)](MultimodalExperiment.pdf)
## Usage
```{r, collapse = TRUE, message = FALSE, results = "hold"}
library(MultimodalExperiment)
ME <-
MultimodalExperiment()
bulkExperiments(ME) <-
ExperimentList(
pbRNAseq = pbRNAseq
)
singleCellExperiments(ME) <-
ExperimentList(
scADTseq = scADTseq,
scRNAseq = scRNAseq
)
subjectMap(ME)[["subject"]] <-
"SUBJECT-1"
sampleMap(ME)[["subject"]] <-
"SUBJECT-1"
cellMap(ME)[["sample"]] <-
"SAMPLE-1"
ME <-
propagate(ME)
experimentData(ME)[["published"]] <-
c(NA_character_, "2018-11-19", "2018-11-19") |>
as.Date()
subjectData(ME)[["condition"]] <-
as.character("healthy")
sampleData(ME)[["sampleType"]] <-
as.character("peripheral blood mononuclear cells")
cellType <- function(x) {
if (x[["CD4"]] > 0L) {
return("T Cell")
}
if (x[["CD14"]] > 0L) {
return("Monocyte")
}
if (x[["CD19"]] > 0L) {
return("B Cell")
}
if (x[["CD56"]] > 0L) {
return("NK Cell")
}
NA_character_
}
cellData(ME)[["cellType"]] <-
experiment(ME, "scADTseq") |>
apply(2L, cellType)
ME
```
## Contributing
Please note that `r BiocStyle::Githubpkg("schifferl/MultimodalExperiment")` is released with a [code of conduct](CODE_OF_CONDUCT.md). By [contributing](CONTRIBUTING.md), you agree to abide by its terms.