@@ -109,25 +109,14 @@ corr = crossSpeciesCellTypeGOCorr(species_1 = 'mmusculus', species_2 = 'dmelanog
109
109
110
110
``` {r heatmap_corr_cross, fig.width = 7, fig.height = 8}
111
111
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
124
113
# helpful when cross-species cell type similarity signal is less clear
125
114
126
- slanter::sheatmap(( corr + 0.5) , width = 9, height = 10)
115
+ plotCellTypeCorrHeatmap( corr, width = 9, height = 10)
127
116
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)
129
119
130
- slanter::sheatmap((corr + 0.5), scale = 'column', width = 9, height = 10)
131
120
132
121
```
133
122
@@ -138,7 +127,9 @@ slanter::sheatmap((corr + 0.5), scale = 'column', width = 9, height = 10)
138
127
``` {r analyze_GO}
139
128
140
129
# 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)
142
133
```
143
134
144
135
``` {r, fig.width = 6, fig.height = 6}
@@ -150,7 +141,7 @@ DimPlot(mmu_go_analyzed, label = TRUE) + NoLegend()
150
141
151
142
152
143
``` {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 )
154
145
```
155
146
156
147
``` {r, fig.width = 6, fig.height = 6}
@@ -159,13 +150,15 @@ DimPlot(dme_go_analyzed, label = TRUE) + NoLegend()
159
150
160
151
## 7. Get co-up and co-down regulated terms between pairs of cell types
161
152
162
- ``` {r shared_go, eval = FALSE }
153
+ ``` {r shared_go}
163
154
164
155
## calculation takes a few minutes due to the Wilcoxon signed rank test
165
156
166
157
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
+ ```
167
159
168
- head(ct_shared_go)
160
+ ``` {r view_shared_go}
161
+ head(ct_shared_go$shared_sig_markers)
169
162
```
170
163
171
164
``` {r shared go cell type, eval = FALSE}
@@ -184,6 +177,7 @@ getCellTypeSharedTerms(shared_go = ct_shared_go,
184
177
185
178
``` {r sessioninfo}
186
179
180
+ # viola
187
181
sessionInfo()
188
182
189
183
```
0 commit comments