forked from KChen-lab/CytoSpill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
64 lines (47 loc) · 1.7 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# CytoSpill
<!-- badges: start -->
<!-- badges: end -->
The goal of CytoSpill is to compensate the spillover effects in CyTOF data which caused by technical effects without relying on control experiment.
## Installation
You can install the development version of CytoSpill from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
# for the original version
devtools::install_github("KChen-lab/CytoSpill")
# or for this forked version
devtools::install_github("SansMorel/CytoSpill")
```
## Example
This is a example which shows you how to compensate a CyTOF dataset, we used a sample dataset that included in our package here:
```{r}
library(CytoSpill)
data(data_Levine32)
str(data_Levine32)
```
We sampled 10,000 cells from the healthy human bone marrow data used in Levine, 2015.
We can check the colunmns of this CyTOF dataset:
```{r cols}
colnames(data_Levine32)
```
And the corresponding markers:
```{r markers}
markers
```
After checking the markers we decided to use columns 5 to 36 for compensation.
We can use the function SpillComp to estimate the spillover matrix and perform compensation.
```{r eval=FALSE}
results <- SpillComp(data = data_Levine32, cols = 5:36, n = 10000, threshold = 0.1, flexrep = 5, neighbor = 1)
```
The function returns a list of results, the first element is the compensated data matrix in flowFrame format, the second one is the estimated spillover matrix and the third one is the derived cutoffs based on our method.