Skip to content

Commit 9fdeab6

Browse files
committed
major upgrade seurat to v5
1 parent 4a42ab8 commit 9fdeab6

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

vignettes/scGOclust_vignette.Rmd

+13-19
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,14 @@ corr = crossSpeciesCellTypeGOCorr(species_1 = 'mmusculus', species_2 = 'dmelanog
109109

110110
```{r heatmap_corr_cross, fig.width = 7, fig.height = 8}
111111
112-
# cross-species cell type profile heatmap
113-
114-
pheatmap(corr, width = 9, height = 10)
115-
116-
pheatmap(corr, scale = 'column', width = 9, height = 10)
117-
118-
119-
```
120-
121-
```{r sheatmap_corr_cross, fig.width = 7, fig.height = 8}
122-
123-
# sheatmap tries to put cells with higher values on the diagonal
112+
# tries to put cells with higher values on the diagonal
124113
# helpful when cross-species cell type similarity signal is less clear
125114
126-
slanter::sheatmap((corr + 0.5), width = 9, height = 10)
115+
plotCellTypeCorrHeatmap(corr, width = 9, height = 10)
127116
128-
# scale by row or column to see relative similarity
117+
# scale per column or row to see the relative similarity
118+
plotCellTypeCorrHeatmap(corr, scale = 'column', width = 9, height = 10)
129119
130-
slanter::sheatmap((corr + 0.5), scale = 'column', width = 9, height = 10)
131120
132121
```
133122

@@ -138,7 +127,9 @@ slanter::sheatmap((corr + 0.5), scale = 'column', width = 9, height = 10)
138127
```{r analyze_GO}
139128
140129
# analyze the cell-by-GO BP profile as a count matrix
141-
mmu_go_analyzed = analyzeGOSeurat(go_seurat_obj = mmu_go_obj, cell_type_col = 'cell_type_annotation')
130+
# Note that the example data has very few cells (for reducing data size), so I am using a small UMAP min_dist and small spread here. Default min_dist is 0.3 and spread is 1.
131+
132+
mmu_go_analyzed = analyzeGOSeurat(go_seurat_obj = mmu_go_obj, cell_type_col = 'cell_type_annotation', min.dist = 0.1, spread = 0.5)
142133
```
143134

144135
```{r, fig.width = 6, fig.height = 6}
@@ -150,7 +141,7 @@ DimPlot(mmu_go_analyzed, label = TRUE) + NoLegend()
150141

151142

152143
```{r}
153-
dme_go_analyzed = analyzeGOSeurat(go_seurat_obj = dme_go_obj, cell_type_col = 'annotation')
144+
dme_go_analyzed = analyzeGOSeurat(go_seurat_obj = dme_go_obj, cell_type_col = 'annotation', min_dist=0.1, spread=0.5)
154145
```
155146

156147
```{r, fig.width = 6, fig.height = 6}
@@ -159,13 +150,15 @@ DimPlot(dme_go_analyzed, label = TRUE) + NoLegend()
159150

160151
## 7. Get co-up and co-down regulated terms between pairs of cell types
161152

162-
```{r shared_go, eval = FALSE}
153+
```{r shared_go}
163154
164155
## calculation takes a few minutes due to the Wilcoxon signed rank test
165156
166157
ct_shared_go = getCellTypeSharedGO(species_1 = 'mmusculus', species_2 = 'dmelanogaster', analyzed_go_seurat_sp1 = mmu_go_analyzed, analyzed_go_seurat_sp2 = dme_go_analyzed, cell_type_col_sp1 = 'cell_type_annotation', cell_type_col_sp2 = 'annotation')
158+
```
167159

168-
head(ct_shared_go)
160+
```{r view_shared_go}
161+
head(ct_shared_go$shared_sig_markers)
169162
```
170163

171164
```{r shared go cell type, eval = FALSE}
@@ -184,6 +177,7 @@ getCellTypeSharedTerms(shared_go = ct_shared_go,
184177

185178
```{r sessioninfo}
186179
180+
# viola
187181
sessionInfo()
188182
189183
```

0 commit comments

Comments
 (0)