Skip to content

Commit

Permalink
revision
Browse files Browse the repository at this point in the history
  • Loading branch information
lshh125 committed Nov 23, 2023
1 parent d831902 commit b6e31ba
Show file tree
Hide file tree
Showing 98 changed files with 190,197 additions and 0 deletions.
883 changes: 883 additions & 0 deletions benchmarks/.ipynb_checkpoints/GSE112294-checkpoint.ipynb

Large diffs are not rendered by default.

802 changes: 802 additions & 0 deletions benchmarks/.ipynb_checkpoints/GSE112294-lib-checkpoint.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

824 changes: 824 additions & 0 deletions benchmarks/.ipynb_checkpoints/GSE112294-lib-plot-checkpoint.ipynb

Large diffs are not rendered by default.

316 changes: 316 additions & 0 deletions benchmarks/.ipynb_checkpoints/GSE118614-plot-checkpoint.ipynb

Large diffs are not rendered by default.

303 changes: 303 additions & 0 deletions benchmarks/.ipynb_checkpoints/covid-plot-checkpoint.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,118 changes: 1,118 additions & 0 deletions benchmarks/.ipynb_checkpoints/gse118614-integration-judge-checkpoint.ipynb

Large diffs are not rendered by default.

1,195 changes: 1,195 additions & 0 deletions benchmarks/.ipynb_checkpoints/gse145926-integration-judge-checkpoint.ipynb

Large diffs are not rendered by default.

723 changes: 723 additions & 0 deletions benchmarks/.ipynb_checkpoints/lung-plot-checkpoint.ipynb

Large diffs are not rendered by default.

589 changes: 589 additions & 0 deletions benchmarks/.ipynb_checkpoints/sim-dist-plot-checkpoint.ipynb

Large diffs are not rendered by default.

591 changes: 591 additions & 0 deletions benchmarks/.ipynb_checkpoints/sim-plot-checkpoint.ipynb

Large diffs are not rendered by default.

318 changes: 318 additions & 0 deletions benchmarks/GSE112294-lib-plot.ipynb

Large diffs are not rendered by default.

597 changes: 597 additions & 0 deletions benchmarks/covid-plot.ipynb

Large diffs are not rendered by default.

587 changes: 587 additions & 0 deletions benchmarks/gse118614-integration-ell.ipynb

Large diffs are not rendered by default.

1,112 changes: 1,112 additions & 0 deletions benchmarks/gse118614-integration-judge.ipynb

Large diffs are not rendered by default.

1,195 changes: 1,195 additions & 0 deletions benchmarks/gse145926-integration-judge.ipynb

Large diffs are not rendered by default.

750 changes: 750 additions & 0 deletions benchmarks/lung-plot.ipynb

Large diffs are not rendered by default.

469 changes: 469 additions & 0 deletions benchmarks/sim-plot.ipynb

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions examples_revision/gse112294-lib-seurat-integration-rpca.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: "GSE118614 10x"
output: html_notebook
---

This is an analysis for the dataset [GSE118614](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE118614) made available by Clark BS et al. in their paper [_Single-cell RNA-Seq Analysis of Retinal Development Identifies NFI Factors as Regulating Mitotic Exit and Late-Born Cell Specification_](https://www.sciencedirect.com/science/article/abs/pii/S0896627319303459).




```{r}
rm(list=ls())
gc()
library(Matrix)
library(Seurat)
```

```{r}
genes <- read.csv("../data/GSE112294/WagnerScience2018_genes.csv", row.names = 1)
metadata <- read.csv("../data/GSE112294/WagnerScience2018_metadata.csv", row.names = 1)
data <- readMM("../data/GSE112294/WagnerScience2018.mtx")
data = t(data)
rownames(data) <- rownames(genes)
colnames(data) <- rownames(metadata)
obj <- CreateSeuratObject(data, meta.data = metadata)
rm(data)
gc()
```

```{r}
objs <- SplitObject(obj, split.by = "library_id")
```

```{r}
rm(obj)
gc()
```


```{r}
for (i in names(objs)) {
objs[[i]] <- NormalizeData(objs[[i]], verbose=FALSE)
objs[[i]] <- FindVariableFeatures(objs[[i]], selection.method = "vst", nfeatures = 2000, verbose=FALSE)
objs[[i]] <- ScaleData(objs[[i]], verbose=FALSE)
objs[[i]] <- RunPCA(objs[[i]], features = VariableFeatures(object = objs[[i]]), verbose=FALSE)
}
anchors <- FindIntegrationAnchors(object.list = objs, dims = 1:30, reduction = 'rpca')
obj <- IntegrateData(anchorset = anchors, dims = 1:30)
```

```{r}
obj <- ScaleData(obj, verbose = FALSE)
obj <- RunPCA(obj, npcs = 30, verbose = FALSE)
ElbowPlot(obj)
```
```{r}
obj <- readRDS("../output-embeddings/gse112294_lib_seurat_rpca.RDS")
```

```{r}
obj <- RunUMAP(obj, dims = 1:10, verbose=FALSE)
```


```{r}
saveRDS(obj, "../output-embeddings/gse112294_lib_seurat_rpca.RDS")
```

```{r}
write.csv(obj@[email protected], '../output-embeddings/gse112294_lib_seurat_rpca.csv')
write.csv(obj@[email protected], '../output-embeddings/gse112294_lib_seurat_rpca_umap.csv')
```
10,260 changes: 10,260 additions & 0 deletions examples_revision/gse112294-lib-seurat-integration-rpca.nb.html

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions examples_revision/gse112294-lib-seurat-integration.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: "GSE118614 10x"
output: html_notebook
---

This is an analysis for the dataset [GSE118614](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE118614) made available by Clark BS et al. in their paper [_Single-cell RNA-Seq Analysis of Retinal Development Identifies NFI Factors as Regulating Mitotic Exit and Late-Born Cell Specification_](https://www.sciencedirect.com/science/article/abs/pii/S0896627319303459).




```{r}
rm(list=ls())
gc()
library(Matrix)
library(Seurat)
```

```{r}
genes <- read.csv("../data/GSE112294/WagnerScience2018_genes.csv", row.names = 1)
metadata <- read.csv("../data/GSE112294/WagnerScience2018_metadata.csv", row.names = 1)
data <- readMM("../data/GSE112294/WagnerScience2018.mtx")
data = t(data)
rownames(data) <- rownames(genes)
colnames(data) <- rownames(metadata)
obj <- CreateSeuratObject(data, meta.data = metadata)
rm(data)
```

```{r}
objs <- SplitObject(obj, split.by = "library_id")
```

```{r}
rm(obj)
gc()
```


```{r}
for (i in names(objs)) {
objs[[i]] <- NormalizeData(objs[[i]], verbose=FALSE)
objs[[i]] <- FindVariableFeatures(objs[[i]], selection.method = "vst", nfeatures = 2000, verbose=FALSE)
objs[[i]] <- ScaleData(objs[[i]], verbose=FALSE)
objs[[i]] <- RunPCA(objs[[i]], features = VariableFeatures(object = objs[[i]]), verbose=FALSE)
}
anchors <- FindIntegrationAnchors(object.list = objs, dims = 1:30)
obj <- IntegrateData(anchorset = anchors, dims = 1:30)
```

```{r}
obj <- ScaleData(obj, verbose = FALSE)
obj <- RunPCA(obj, npcs = 30, verbose = FALSE)
ElbowPlot(obj)
```



```{r}
obj <- RunUMAP(obj, dims = 1:30, verbose=FALSE)
```


```{r}
saveRDS(obj, "../output-embeddings/gse112294_lib_seurat.RDS")
```

```{r}
write.csv(obj@[email protected], '../output-embeddings/gse112294_lib_seurat.csv')
write.csv(obj@[email protected], '../output-embeddings/gse112294_lib_seurat_umap.csv')
```
12,961 changes: 12,961 additions & 0 deletions examples_revision/gse112294-lib-seurat-integration.nb.html

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions examples_revision/gse112294-seurat-integration-rpca.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: "GSE118614 10x"
output: html_notebook
---

This is an analysis for the dataset [GSE118614](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE118614) made available by Clark BS et al. in their paper [_Single-cell RNA-Seq Analysis of Retinal Development Identifies NFI Factors as Regulating Mitotic Exit and Late-Born Cell Specification_](https://www.sciencedirect.com/science/article/abs/pii/S0896627319303459).




```{r}
rm(list=ls())
gc()
library(Matrix)
library(Seurat)
```

```{r}
genes <- read.csv("../data/GSE112294/WagnerScience2018_genes.csv", row.names = 1)
metadata <- read.csv("../data/GSE112294/WagnerScience2018_metadata.csv", row.names = 1)
data <- readMM("../data/GSE112294/WagnerScience2018.mtx")
data = t(data)
rownames(data) <- rownames(genes)
colnames(data) <- rownames(metadata)
obj <- CreateSeuratObject(data, meta.data = metadata)
```

```{r}
objs <- SplitObject(obj, split.by = "TimeID")
```

```{r}
rm(obj)
gc()
```


```{r}
for (i in names(objs)) {
objs[[i]] <- NormalizeData(objs[[i]], verbose=FALSE)
objs[[i]] <- FindVariableFeatures(objs[[i]], selection.method = "vst", nfeatures = 2000, verbose=FALSE)
objs[[i]] <- ScaleData(objs[[i]], verbose=FALSE)
objs[[i]] <- RunPCA(objs[[i]], features = VariableFeatures(object = objs[[i]]), verbose=FALSE)
}
anchors <- FindIntegrationAnchors(object.list = objs, dims = 1:30, reduction='rpca')
obj <- IntegrateData(anchorset = anchors, dims = 1:30)
```

```{r}
obj <- ScaleData(obj, verbose = FALSE)
obj <- RunPCA(obj, npcs = 30, verbose = FALSE)
ElbowPlot(obj)
```


```{r}
obj <- RunUMAP(obj, dims = 1:30, verbose=FALSE)
```


```{r}
saveRDS(obj, "../output-embeddings/gse112294_seurat_rpca.RDS")
```

```{r}
write.csv(obj@[email protected], '../output-embeddings/gse112294_seurat_rpca.csv')
write.csv(obj@[email protected], '../output-embeddings/gse112294_seurat_rpca_umap.csv')
```
2,245 changes: 2,245 additions & 0 deletions examples_revision/gse112294-seurat-integration-rpca.nb.html

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions examples_revision/gse112294-seurat-integration.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: "GSE118614 10x"
output: html_notebook
---

This is an analysis for the dataset [GSE118614](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE118614) made available by Clark BS et al. in their paper [_Single-cell RNA-Seq Analysis of Retinal Development Identifies NFI Factors as Regulating Mitotic Exit and Late-Born Cell Specification_](https://www.sciencedirect.com/science/article/abs/pii/S0896627319303459).




```{r}
rm(list=ls())
gc()
library(Matrix)
library(Seurat)
```

```{r}
genes <- read.csv("../data/GSE112294/WagnerScience2018_genes.csv", row.names = 1)
metadata <- read.csv("../data/GSE112294/WagnerScience2018_metadata.csv", row.names = 1)
data <- readMM("../data/GSE112294/WagnerScience2018.mtx")
data = t(data)
rownames(data) <- rownames(genes)
colnames(data) <- rownames(metadata)
obj <- CreateSeuratObject(data, meta.data = metadata)
```

```{r}
objs <- SplitObject(obj, split.by = "TimeID")
```

```{r}
rm(obj)
gc()
```


```{r}
for (i in names(objs)) {
objs[[i]] <- NormalizeData(objs[[i]], verbose=FALSE)
objs[[i]] <- FindVariableFeatures(objs[[i]], selection.method = "vst", nfeatures = 2000, verbose=FALSE)
objs[[i]] <- ScaleData(objs[[i]], verbose=FALSE)
objs[[i]] <- RunPCA(objs[[i]], features = VariableFeatures(object = objs[[i]]), verbose=FALSE)
}
anchors <- FindIntegrationAnchors(object.list = objs, dims = 1:30)
obj <- IntegrateData(anchorset = anchors, dims = 1:30)
```

```{r}
obj <- ScaleData(obj, verbose = FALSE)
obj <- RunPCA(obj, npcs = 30, verbose = FALSE)
ElbowPlot(obj)
```


```{r}
obj <- RunUMAP(obj, dims = 1:30, verbose=FALSE)
```


```{r}
saveRDS(obj, "../output-embeddings/gse112294_seurat.RDS")
```

```{r}
write.csv(obj@[email protected], '../output-embeddings/gse112294_seurat.csv')
write.csv(obj@[email protected], '../output-embeddings/gse112294_seurat_umap.csv')
```
2,273 changes: 2,273 additions & 0 deletions examples_revision/gse112294-seurat-integration.nb.html

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions examples_revision/gse112294_all_harmony_integration.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: "GSE112294 10x"
output: html_notebook
---

This is an analysis for the dataset [GSE118614](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE118614) made available by Clark BS et al. in their paper [_Single-cell RNA-Seq Analysis of Retinal Development Identifies NFI Factors as Regulating Mitotic Exit and Late-Born Cell Specification_](https://www.sciencedirect.com/science/article/abs/pii/S0896627319303459).



```{r}
rm(list=ls())
gc()
library(Matrix)
library(Seurat)
```

```{r}
genes <- read.csv("../data/GSE112294/WagnerScience2018_genes.csv", row.names = 1)
metadata <- read.csv("../data/GSE112294/WagnerScience2018_metadata.csv", row.names = 1)
data <- readMM("../data/GSE112294/WagnerScience2018.mtx")
data = t(data)
rownames(data) <- rownames(genes)
colnames(data) <- rownames(metadata)
obj <- CreateSeuratObject(data, meta.data = metadata)
```


```{r}
obj <- NormalizeData(obj, verbose=FALSE)
obj <- FindVariableFeatures(obj, selection.method = "vst", nfeatures = 2000, verbose=FALSE)
obj <- ScaleData(obj, verbose = FALSE)
obj <- RunPCA(obj, npcs = 30, verbose = FALSE)
ElbowPlot(obj)
```


```{r}
ptm = proc.time()
obj <- RunHarmony(obj, "TimeID", plot_convergence = TRUE)
proc.time() - ptm
```


```{r}
obj <- RunUMAP(obj, reduction = "harmony", dims = 1:30, verbose=FALSE)
```

```{r}
saveRDS(obj, "../output-embeddings/gse112294_harmony.RDS")
```

```{r}
write.csv(obj@[email protected], '../output-embeddings/gse112294_harmony.csv')
write.csv(obj@[email protected], '../output-embeddings/gse112294_harmony_umap.csv')
```

1,957 changes: 1,957 additions & 0 deletions examples_revision/gse112294_all_harmony_integration.nb.html

Large diffs are not rendered by default.

Loading

0 comments on commit b6e31ba

Please sign in to comment.