@@ -46,7 +46,7 @@ obj <- createSpaTalk(st_data = as.matrix(st_data),
46
46
47
47
### Use ` plot_st_pie_generate() ` to view the cell-type composition
48
48
49
- ``` {r plot_st_pie_generate, echo=TRUE}
49
+ ``` {r plot_st_pie_generate, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
50
50
plot_st_pie_generate(st_meta = st_meta, pie_scale = 1.3, xy_ratio = 1.8)
51
51
52
52
```
@@ -65,31 +65,31 @@ obj <- dec_celltype(object = obj,
65
65
66
66
### Use ` plot_st_pie() ` to view predicted cell-type composition
67
67
68
- ``` {r plot_st_pie, echo=TRUE}
68
+ ``` {r plot_st_pie, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
69
69
# Scatter pie plot for each spot
70
70
plot_st_pie(object = obj, pie_scale = 1.3, xy_ratio = 1.8)
71
71
72
72
```
73
73
74
74
### Use ` plot_st_celltype_percent() ` to view cell-type percent
75
75
76
- ``` {r plot_st_celltype_percent, echo=TRUE}
76
+ ``` {r plot_st_celltype_percent, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
77
77
# plot cell-type percent across spatial spots
78
- plot_st_celltype_percent(object = obj, celltype = 'Oligo',size = 3 )
78
+ plot_st_celltype_percent(object = obj, celltype = 'Oligo',size = 4 )
79
79
80
80
```
81
81
82
82
### Use ` plot_st_gene() ` to view gene expression
83
83
84
- ``` {r plot_st_gene, echo=TRUE}
84
+ ``` {r plot_st_gene, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
85
85
# plot marker gene expression across spatial spots
86
- plot_st_gene(object = obj, gene = 'Plp1',size = 3 , if_use_newmeta = F)
86
+ plot_st_gene(object = obj, gene = 'Plp1',size = 4 , if_use_newmeta = F)
87
87
88
88
```
89
89
90
90
### Use ` plot_st_cor_heatmap() ` to view correlation heatmap
91
91
92
- ``` {r plot_st_cor_heatmap, echo=TRUE}
92
+ ``` {r plot_st_cor_heatmap, fig.width=4, fig.height=3, fig.align='center', echo=TRUE}
93
93
# correlation between marker gene expression and cell type percent across spatial spots
94
94
plot_st_cor_heatmap(object = obj,
95
95
marker_genes = c("Plp1","Vip","Sst","Lamp5","Pcp4","Mfge8","Pvalb"),
@@ -103,23 +103,23 @@ plot_st_cor_heatmap(object = obj,
103
103
## ** ST at single-cell resolution**
104
104
### Use ` plot_st_celltype() ` to view cell type in space
105
105
106
- ``` {r plot_st_celltype, echo=TRUE}
106
+ ``` {r plot_st_celltype, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
107
107
# plot cell type in reconstructed ST atlas
108
- plot_st_celltype(object = obj, celltype = 'Oligo')
108
+ plot_st_celltype(object = obj, celltype = 'Oligo', size = 2 )
109
109
110
110
```
111
111
112
112
### Use ` plot_st_gene() ` to view gene expression in space
113
113
114
- ``` {r plot_st_gene2, echo=TRUE}
114
+ ``` {r plot_st_gene2, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
115
115
# plot marker gene expression in reconstructed ST atlas
116
- plot_st_gene(object = obj,gene = 'Plp1', if_use_newmeta = T)
116
+ plot_st_gene(object = obj,gene = 'Plp1', if_use_newmeta = T, size = 2 )
117
117
118
118
```
119
119
120
120
### Use ` plot_st_celltype_density() ` to view cell-type density in space
121
121
122
- ``` {r plot_st_celltype_density, echo=TRUE}
122
+ ``` {r plot_st_celltype_density, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
123
123
# plot cell-type density in reconstructed ST atlas
124
124
plot_st_celltype_density(object = obj,
125
125
celltype = 'Oligo',
@@ -136,9 +136,9 @@ plot_st_celltype_density(object = obj,
136
136
137
137
### Use ` plot_st_celltype_all() ` to view all cell types in space
138
138
139
- ``` {r plot_st_celltype_all, echo=TRUE}
139
+ ``` {r plot_st_celltype_all, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
140
140
# plot all cell types in reconstructed ST atlas
141
- plot_st_celltype_all(object = obj)
141
+ plot_st_celltype_all(object = obj, size = 2 )
142
142
143
143
```
144
144
@@ -167,9 +167,13 @@ obj_lr_path$path_pvalue
167
167
168
168
### Use ` plot_ccdist() ` to view distribution of senders and receivers
169
169
170
- ``` {r plot_ccdist, echo=TRUE}
170
+ ``` {r plot_ccdist, fig.width=6, fig.height=6, fig.align='center', echo=TRUE}
171
171
# Point plot with spatial distribution of celltype_sender and celltype_receiver
172
- plot_ccdist(object = obj, celltype_sender = 'SST', celltype_receiver = 'PVALB')
172
+ plot_ccdist(object = obj,
173
+ celltype_sender = 'SST',
174
+ celltype_receiver = 'PVALB',
175
+ size = 2,
176
+ arrow_length = 0.1)
173
177
174
178
```
175
179
@@ -185,20 +189,22 @@ Given the limited LR pairs, we do not show the result here
185
189
186
190
### Use ` plot_lrpair() ` to view the specific LRI
187
191
188
- ``` {r plot_lrpair, echo=TRUE}
192
+ ``` {r plot_lrpair, fig.width=5, fig.height=6, fig.align='center', echo=TRUE}
189
193
# Point plot with LR pair from celltype_sender to celltype_receiver
190
194
plot_lrpair(object = obj,
191
195
celltype_sender = 'SST',
192
196
ligand = 'Sst',
193
197
celltype_receiver = 'PVALB',
194
198
receptor = 'Sstr2',
195
- if_plot_density = F)
199
+ if_plot_density = F,
200
+ size = 2,
201
+ arrow_length = 0.1)
196
202
197
203
```
198
204
199
205
### Use ` plot_lrpair_vln() ` to view violin plot with spatial distance of LRI
200
206
201
- ``` {r plot_lrpair_vln, echo=TRUE}
207
+ ``` {r plot_lrpair_vln, fig.width=8, fig.height=6, fig.align='center', echo=TRUE}
202
208
# Violin plot with spatial distance of LR pair between senders and receivers and between all cell-cell pairs
203
209
plot_lrpair_vln(object = obj,
204
210
celltype_sender = 'SST',
@@ -210,7 +216,7 @@ plot_lrpair_vln(object = obj,
210
216
211
217
### Use ` plot_lr_path() ` to view network with LR and downstream pathways
212
218
213
- ``` {r plot_lr_path, echo=TRUE}
219
+ ``` {r plot_lr_path, fig.width=6, fig.height=6, fig.align='center', echo=TRUE}
214
220
# Plot network with LR and downstream pathways
215
221
plot_lr_path(object = obj,
216
222
celltype_sender = 'SST',
@@ -222,7 +228,7 @@ plot_lr_path(object = obj,
222
228
223
229
### Use ` plot_path2gene() ` to view river plot of significantly activated pathways
224
230
225
- ``` {r plot_path2gene, echo=TRUE}
231
+ ``` {r plot_path2gene, fig.width=8, fig.height=6, fig.align='center', echo=TRUE}
226
232
# River plot of significantly activated pathways and related downstream genes of receptors
227
233
plot_path2gene(object = obj,
228
234
celltype_sender = 'SST',
@@ -237,7 +243,7 @@ plot_path2gene(object = obj,
237
243
To infer all paired cell-cell communications, use ` dec_cci_all() ` instead of ` dec_cci() `
238
244
239
245
``` {r dec_cci_all, echo=TRUE}
240
- # Infer cell-cell communications from SST to PVALB neurons
246
+ # Infer all cell-cell communications
241
247
# obj <- dec_cci_all(object = obj)
242
248
```
243
249
0 commit comments