Skip to content

Commit

Permalink
Add CuiHacohen2023
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpeidli committed Dec 8, 2023
1 parent 79933a2 commit 351120c
Show file tree
Hide file tree
Showing 10 changed files with 2,686 additions and 14 deletions.
36 changes: 36 additions & 0 deletions dataset_processing/notebooks/CuiHacohen2023.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "R Notebook"
output: html_notebook
---
```{r}
library(Seurat)
```


```{r}
data = Seurat::ReadMtx('/scratch/peidli/scPerturb/CuiHacohen2023/cytokine-samples17-matrix.mtx', '/scratch/peidli/scPerturb/CuiHacohen2023/cytokine-samples17-barcodes.tsv', '/scratch/peidli/scPerturb/CuiHacohen2023/cytokine-samples17-features.tsv', strip.suffix=T)
tags = Seurat::ReadMtx('/scratch/peidli/scPerturb/CuiHacohen2023/cytokine-hashtags17-matrix.mtx', '/scratch/peidli/scPerturb/CuiHacohen2023/cytokine-hashtags17-barcodes.tsv', '/scratch/peidli/scPerturb/CuiHacohen2023/cytokine-hashtags17-features.tsv', feature.column=1)
```
```{r}
joint.bcs <- intersect(colnames(data), colnames(tags))
print(length(joint.bcs))
data <- data[, joint.bcs]
tags <- tags[, joint.bcs]
tags <- tags[rowSums(tags) > 10000,] # Remove tags with <10k hashtag counts
rowSums(tags)
```

```{r}
# Create Seurat object and demultiplex
seurat_object <- Seurat::CreateSeuratObject(counts = data)
seurat_object[["HTO"]] <- Seurat::CreateAssayObject(counts = tags)
```


```{r}
seurat_object <- Seurat::NormalizeData(seurat_object, assay = "HTO", normalization.method = "CLR")
seurat_object <- Seurat::MULTIseqDemux(seurat_object, assay = "HTO")
```



Loading

0 comments on commit 351120c

Please sign in to comment.