-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
72 lines (57 loc) · 1.75 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
message = FALSE,
warning = FALSE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# clustifyrdatahub
clustifyrdatahub provides external reference data sets for cell-type assignment with [clustifyr](https://rnabioco.github.io/clustifyr).
## Installation
``` r
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("clustifyrdatahub")
```
## Available references include
```{r, echo=FALSE}
knitr::kable(dplyr::select(
read.csv(system.file("extdata", "metadata.csv", package = "clustifyrdatahub")),
c(1, 9, 2:7)))
```
## To use `clustifyrdatahub`
```{r}
library(ExperimentHub)
eh <- ExperimentHub()
## query
refs <- query(eh, "clustifyrdatahub")
refs
## either by index or id
ref_hema_microarray <- refs[[7]] ## load the first resource in the list
ref_hema_microarray <- refs[["EH3450"]] ## load by EH id
## or list and load
refs <- listResources(eh, "clustifyrdatahub")
ref_hema_microarray <- loadResources(eh, "clustifyrdatahub", "ref_hema_microarray")[[1]]
## use for classification of cell types
res <- clustifyr::clustify(
input = clustifyr::pbmc_matrix_small,
metadata = clustifyr::pbmc_meta$classified,
ref_mat = ref_hema_microarray,
query_genes = clustifyr::pbmc_vargenes
)
```
```{r}
## or load refs by function name (after loading hub library)
library(clustifyrdatahub)
ref_hema_microarray()[1:5, 1:5] ## data are loaded
ref_hema_microarray(metadata = TRUE) ## only metadata
```
Data sets have uniform suffixes:
- `ref_*` : the prebuilt reference expression matrix.