Diff of /docs/voltronobjects.Rmd [000000] .. [413088]

Switch to unified view

a b/docs/voltronobjects.Rmd
1
---
2
title: "Importing Spatial Data"
3
output: 
4
  html_document:
5
    toc: true
6
    toc_depth: 4
7
    toc_float:
8
      collapsed: false
9
      smooth_scroll: false
10
---
11
12
<style>
13
.title{
14
  display: none;
15
}
16
body {
17
  text-align: justify
18
}
19
.center {
20
  display: block;
21
  margin-left: auto;
22
  margin-right: auto;
23
}
24
table, th, td {
25
  border-collapse: collapse;
26
  align-self: center;
27
  padding-right: 10px;
28
  padding-left: 10px;
29
}
30
</style>
31
32
```{css, echo=FALSE}
33
.watch-out {
34
  color: black;
35
}
36
```
37
38
```{r setup, include=FALSE}
39
# use rmarkdown::render_site(envir = knitr::knit_global())
40
knitr::opts_chunk$set(highlight = TRUE, echo = TRUE)
41
library(VoltRon)
42
library(patchwork)
43
library(magick)
44
if(!requireNamespace("ggnewscale"))
45
  install.packages("ggnewscale")
46
```
47
48
<br>
49
50
51
# Working with VoltRon objects
52
53
In this tutorial, we will cover some of the fundemantel built-in functions of VoltRon to manage data, images and spatial information of assays. Here is the list of example datasets included in the Package.
54
55
```{r eval = FALSE, class.source="watch-out"}
56
data("visium_data")
57
data("melc_data")
58
data("xenium_data")
59
data("merged_object")
60
```
61
62
<br>
63
64
## Sample Metadata {#samplemetadata}
65
66
The sample metadata is a summarized data frame which provides informations on assays, layers and sample (tissue blocks) included in the VoltRon object. You can use the **SampleMetadata** function to call this table. The row names are the unique assay IDs, following assay types (e.g. Visium), layer name and Sample (typicall tissue block with multiple layers and assays).
67
68
```{r class.source="watch-out"}
69
SampleMetadata(visium_data)
70
```
71
72
<br>
73
74
## Metadata
75
76
The **Metadata** function calls the metadata table of the main assay type (see [vrMainAssay](#assays)).
77
78
```{r eval = FALSE, class.source="watch-out"}
79
Metadata(visium_data)
80
```
81
82
```{r echo = FALSE, class.source="watch-out"}
83
head(Metadata(visium_data),6)
84
```
85
86
You can also specify the assay ID or the assay type to call metadata of a subset of spatial points.
87
88
```{r eval = FALSE, class.source="watch-out"}
89
Metadata(visium_data, assay = "Visium")
90
Metadata(visium_data, assay = "Assay1")
91
```
92
93
The **type** argument returns all spatial points of a given spatial point type (ROI, spot, cell, molecule or tile).
94
95
```{r eval = FALSE, class.source="watch-out"}
96
Metadata(visium_data, type = "spot")
97
```
98
99
If the type argument is specified as **all**. Then this would return the VoltRon Metadata Object (vrMetadata)
100
101
```{r class.source="watch-out"}
102
Metadata(visium_data, type = "all")
103
```
104
105
<br>
106
107
## Spatial Points {#spatialpoints}
108
109
In a VoltRon object, spatial points are spatially defined entities with coordinates, segments which are of any of five assay types (ROI, spot, cell, molecule and tile).
110
111
The **vrSpatialPoints** function return the IDs of these entities for further downstream operations, such as subsetting etc.
112
113
```{r eval = FALSE, class.source="watch-out"}
114
vrSpatialPoints(visium_data)
115
```
116
117
```{r echo = FALSE, class.source="watch-out"}
118
head(vrSpatialPoints(visium_data),3)
119
```
120
121
You can also specify the assay ID or the assay type to call metadata of a subset of spatial points.
122
123
```{r eval = FALSE, class.source="watch-out"}
124
vrSpatialPoints(visium_data, assay = "Visium")
125
vrSpatialPoints(visium_data, assay = "Assay1")
126
```
127
128
```{r echo = FALSE, class.source="watch-out"}
129
head(vrSpatialPoints(visium_data, assay = "Visium"),3)
130
```
131
132
<br>
133
134
## Assays {#assays}
135
136
The default (or main) assay of the VoltRon object is typically shown when printed (next to the assay name says "main" in paranthesis)
137
138
```{r class.source="watch-out"}
139
melc_data
140
```
141
142
You can also call/get the name of the default (or main) using the **vrMainAssay** function
143
144
```{r class.source="watch-out"}
145
vrMainAssay(melc_data)
146
```
147
148
You can also set the main assay yourself, but only the assay types given in the **Assay** column of **SampleMetadata(object)**.
149
150
```{r class.source="watch-out"}
151
SampleMetadata(melc_data)
152
```
153
154
```{r class.source="watch-out"}
155
vrMainAssay(melc_data) <- "MELC"
156
```
157
158
You can also get the assay IDs associated with the main assay using **vrAssayNames** function. 
159
160
```{r class.source="watch-out"}
161
vrAssayNames(melc_data)
162
```
163
164
The assay type can be provided with the **assay** arguement to get type specific assay IDs
165
166
```{r class.source="watch-out"}
167
vrAssayNames(melc_data, assay = "MELC")
168
```
169
170
<br>
171
172
## Coordinates and Segments
173
174
The **vrCoordinates** function is used to call the centroids of spots, cells and all other spatial points types with VoltRon objects. 
175
176
```{r eval = FALSE, class.source="watch-out"}
177
vrCoordinates(visium_data)
178
```
179
180
```{r echo = FALSE, class.source="watch-out"}
181
head(vrCoordinates(visium_data),6)
182
```
183
184
You can also specify the assay ID or the assay type to call coordinates of a subset of spatial points.
185
186
```{r eval = FALSE, class.source="watch-out"}
187
vrCoordinates(visium_data, assay = "Visium")
188
vrCoordinates(visium_data, assay = "Assay1")
189
```
190
191
<br>
192
193
Each assay a VoltRon object may incorporate indefinite number of coordinate systems. One can look for these coordinate systems using the **vrMainSpatial** function, and select one of systems to call coordinates (see [vrMainSpatial](#image))
194
195
```{r eval = FALSE, class.source="watch-out"}
196
vrCoordinates(visium_data, spatial_name = "main")
197
```
198
199
The **reg** option in the **vrCoordinates** function looks for a registered version of the main coordinate system and returns its coordinates (if there is any).
200
201
```{r eval = FALSE, class.source="watch-out"}
202
vrCoordinates(visium_data, spatial_name = "main", reg = TRUE)
203
```
204
205
```{r echo = FALSE, class.source="watch-out"}
206
head(vrCoordinates(visium_data, spatial_name = "main", reg = TRUE),6)
207
```
208
209
<br>
210
211
The arguements of the **vrSegments** functions are idential to vrCoordinates and return a list of polygon corners associated with the coordinate system of the coordinates. 
212
213
```{r eval = FALSE, class.source="watch-out"}
214
vrSegments(xenium_data)
215
vrSegments(xenium_data, assay = "Xenium")
216
vrSegments(xenium_data, assay = "Assay1")
217
vrSegments(xenium_data, spatial_name = "main")
218
vrSegments(xenium_data, spatial_name = "main", reg = TRUE)
219
```
220
221
```{r echo = FALSE, class.source="watch-out"}
222
head(vrSegments(xenium_data),2)
223
```
224
225
<br>
226
227
## Images and Coordinate Systems {#image}
228
229
Below we review some of the essential built-in functions to manipulate and manage images of a VoltRon object as well as the coordinate systems that are associated with these images.
230
231
<br>
232
233
### Spatial Coordinate Systems
234
235
In a VoltRon object, each image has a unique ID which is also associated with a coordinate (or spatial) system. The names of these spatial systems can be called using the **vrSpatialNames** function.
236
237
```{r class.source="watch-out"}
238
vrSpatialNames(visium_data)
239
```
240
241
You can also specify the assay ID or the assay type to call image names of a subset assays or any assay type (see [Sample Metadata](#samplemetadata))
242
243
```{r eval = FALSE, class.source="watch-out"}
244
vrSpatialNames(visium_data, assay = "Visium")
245
vrSpatialNames(visium_data, assay = "Assay1")
246
```
247
248
```{r echo = FALSE, class.source="watch-out"}
249
vrSpatialNames(visium_data, assay = "Visium")
250
```
251
252
<br>
253
254
If you wanna see the list of all spatial systems associated with all assays of the main assay type, you can call the **vrMainSpatial** function.
255
256
```{r class.source="watch-out"}
257
vrMainSpatial(visium_data)
258
```
259
260
You can also specify the assay ID or the assay type to call spatial system names of a subset assays or any assay type (see [Sample Metadata](#samplemetadata))
261
262
```{r eval = FALSE, class.source="watch-out"}
263
vrMainSpatial(visium_data, assay = "Visium")
264
vrMainSpatial(visium_data, assay = "Assay1")
265
```
266
267
```{r echo = FALSE, class.source="watch-out"}
268
vrMainSpatial(visium_data, assay = "Visium")
269
```
270
271
<br>
272
273
### Channel Names
274
275
Each spatial system object (vrSpatial) in VoltRon object can also include a indefinite number of channels which you can get (or request) a list of for further use.
276
277
```{r eval = FALSE, class.source="watch-out"}
278
vrImageChannelNames(melc_data)
279
vrImageChannelNames(melc_data, assay = "MELC")
280
vrImageChannelNames(melc_data, assay = "Assay1")
281
```
282
283
```{r echo = FALSE, class.source="watch-out"}
284
vrImageChannelNames(melc_data)
285
```
286
287
<br>
288
289
### Get and Set Images
290
291
In VoltRon, images can be called specifically, or return as a list. The return image is of a magick image object (see [magick](https://cran.r-project.org/web/packages/magick/vignettes/intro.html) package)
292
293
```{r eval = FALSE, class.source="watch-out"}
294
vrImages(visium_data)
295
vrImages(visium_data, assay = "Visium")
296
vrImages(visium_data, assay = "Assay1")
297
```
298
299
```{r echo = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
300
magick::image_ggplot(vrImages(visium_data))
301
```
302
303
<!-- <img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_HE.png" class="center"> -->
304
305
<br>
306
307
Once you know the name of a specific channel, you can the image of a specific channel by providing the name and the associated channel.
308
309
```{r eval = FALSE, class.source="watch-out"}
310
vrImages(melc_data, name = "MELC", channel = "DAPI")
311
```
312
313
```{r echo = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
314
magick::image_ggplot(vrImages(melc_data, name = "MELC", channel = "DAPI"))
315
```
316
317
<!-- <img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/importdata_DAPI.png" class="center"> -->
318
319
<br>
320
321
You can set up the main channel as well as the main spatial system name for later use.
322
323
```{r eval = FALSE, class.source="watch-out"}
324
vrMainSpatial(melc_data, assay = "Assay1") <- c("MELC", "CD45")
325
vrImages(melc_data)
326
```
327
328
```{r echo = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
329
vrMainSpatial(melc_data, assay = "Assay1") <- c("MELC", "CD45")
330
magick::image_ggplot(vrImages(melc_data))
331
```
332
333
<!-- <img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/importdata_CD45.png" class="center"> -->
334
335
<br>
336
337
You can also resize the images as they are being returned. This is usually used for visualization purposes and helps speeding up visualization for large images. This is accomplished with **scale.perc** arguement.
338
339
```{r eval = FALSE, class.source="watch-out"}
340
vrImages(melc_data, scale.perc = 25)
341
```
342
343
<br>
344
345
### Combining Image Channels
346
347
VoltRon even allows manipulation of channel images if you also provide an associate list of colors.
348
349
```{r class.source="watch-out"}
350
melc_data <- combineChannels(melc_data, 
351
                             channels = c("DAPI", "CD45"), colors = c("grey", "green"), 
352
                             channel_key = "combined")
353
```
354
355
These new images can be stored as new channels within the same image object, and called later again
356
357
```{r class.source="watch-out"}
358
vrImageChannelNames(melc_data)
359
```
360
361
```{r eval = FALSE, class.source="watch-out"}
362
vrImages(melc_data, channel = "combined")
363
```
364
365
```{r echo = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
366
magick::image_ggplot(vrImages(melc_data, channel = "combined"))
367
```
368
369
<br>
370
371
## Feature Matrix (Data)
372
373
```{r class.source="watch-out"}
374
vrData(visium_data)[3:8,3:5]
375
```
376
377
```{r class.source="watch-out"}
378
vrData(visium_data, norm = TRUE)[3:8,3:5]
379
```
380
381
<br>
382
383
## Embeddings {#embedding}
384
385
You can parse and even set individual embedding elements in a VoltRon object.
386
387
```{r class.source="watch-out"}
388
vrEmbeddingNames(xenium_data)
389
```
390
391
You can use these names of get the associated embedding dataset from the object. 
392
393
```{r eval = FALSE, class.source="watch-out"}
394
vrEmbeddings(xenium_data, type = "umap")
395
```
396
397
```{r echo = FALSE, class.source="watch-out"}
398
head(vrEmbeddings(xenium_data, type = "umap"),6)
399
```
400
401
You can also set and create new embedding elements in the voltron object. In this case, you have to make sure that the row names should match with the targeted spatial points.
402
403
```{r class.source="watch-out"}
404
new_umap_data <- vrEmbeddings(xenium_data, type = "umap")
405
vrEmbeddings(xenium_data, type = "new_umap") <- new_umap_data*2
406
```
407
408
Now we can observe changes to the new embedding data. 
409
410
```{r eval = FALSE, class.source="watch-out"}
411
vrEmbeddings(xenium_data, type = "new_umap")
412
```
413
414
```{r echo = FALSE, class.source="watch-out"}
415
head(vrEmbeddings(xenium_data, type = "new_umap"),6)
416
```
417
418
You can choose individual assay names or assay classes.
419
420
```{r eval = FALSE, class.source="watch-out"}
421
vrEmbeddings(xenium_data, type = "umap", assay = "Xenium")
422
vrEmbeddings(xenium_data, type = "pca", assay = "Assay1")
423
```
424
425
<br>
426
427
## Subsetting VoltRon objects
428
429
<br>
430
431
### sample/assay 
432
433
VoltRon object can be subsetted in a variety of ways using assay names, sample names, spatial point names, features (e.g. gene), image coordinates (crop boxes or bounding boxes) as well as interactively.
434
435
```{r class.source="watch-out"}
436
visium_data_subset <- subset(visium_data, assays = "Assay1")
437
```
438
439
```{r class.source="watch-out"}
440
visium_data_subset <- subset(visium_data, samples = "Anterior1")
441
visium_data_subset
442
```
443
444
<br>
445
446
### spatial points
447
448
You can use a list of spatial points (typically using **vrSpatialPoints** function, see [vrSpatialPoints](#spatialpoints)) 
449
450
```{r eval = FALSE, class.source="watch-out"}
451
selected_points <- vrSpatialPoints(visium_data)
452
selected_points[1:20]
453
```
454
455
```{r echo = FALSE, class.source="watch-out"}
456
selected_points <- vrSpatialPoints(visium_data)
457
head(selected_points,3)
458
```
459
460
```{r class.source="watch-out"}
461
visium_data_subset <- subset(visium_data, spatialpoints = selected_points[1:20])
462
visium_data_subset
463
```
464
465
<br>
466
467
### features
468
469
You can select a few number of features and subset the features given this list. However, it would only subset the main assay (see [vrMainAssay](#assays))
470
471
```{r class.source="watch-out"}
472
selected_features <- vrFeatures(visium_data)
473
selected_features[1:20]
474
```
475
476
```{r class.source="watch-out"}
477
visium_data_subset <- subset(visium_data, features = selected_features[1:20])
478
vrFeatures(visium_data_subset)
479
```
480
481
<br>
482
483
### Interactive subsetting
484
485
VoltRon allows interactively subsetting spatial data. Using the arguement **interactive = TRUE**, a mini Shiny app is triggered where users can select a bounding box to crop the spatial data.
486
487
```{r eval = FALSE, class.source="watch-out"}
488
visium_data_subset_info <- subset(visium_data, interactive = TRUE)
489
visium_data_subset <- visium_data_subset_info$subsets[[1]]
490
```
491
492
```
493
VoltRon Object 
494
Anterior1_subset: 
495
  Layers: Section1 
496
Assays: Visium(Main) 
497
```
498
499
```{r eval = FALSE, class.source="watch-out"}
500
vrImages(visium_data_subset)
501
```
502
503
<br>
504
505
## Visualization
506
507
VoltRon provides visualization utilities for both spatial and embedding level visualizations.
508
509
<br>
510
511
### Spatial Plots
512
513
**vrSpatialPlot** is the main function for visualize labels and identities of cells. This information is parsed from the Metadata of the main assay (see [vrMainAssay](#assays)). The users can also specify the assay.
514
515
```{r eval = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
516
vrSpatialPlot(xenium_data, group.by = "clusters")
517
```
518
519
<img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_sp.png" class="center">
520
521
<br>
522
523
You can also visualize the segments of spatial points and even get the segments transparent
524
525
```{r eval = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
526
vrSpatialPlot(xenium_data, group.by = "clusters", plot.segments = TRUE, alpha = 0.6)
527
```
528
529
<img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_spsegment.png" class="center">
530
531
<br>
532
533
The background color can be set to any color.
534
535
```{r eval = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
536
vrSpatialPlot(xenium_data, group.by = "clusters", plot.segments = TRUE, 
537
              background.color = "white")
538
```
539
540
<img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_spback.png" class="center">
541
542
<br>
543
544
In cases where there are multiple coordinate systems, you can get the background set to the name of the image (or coordinate system). You can get the name of these images from [vrSpatialNames](#image). 
545
546
If also want to select a channel from the same coordinate system, you can set background arguement as a vector of 2 where first is the name of the image (coordinate system) and the other would be channel name. You can get the name of these channels from [vrImageChannelNames](#image).
547
548
549
```{r eval = FALSE, class.source="watch-out"}
550
vrSpatialPlot(xenium_data, group.by = "clusters", plot.segments = TRUE,
551
              spatial = "main")
552
vrSpatialPlot(xenium_data, group.by = "clusters", plot.segments = TRUE,
553
              spatial = "main", channel = "DAPI")
554
```
555
556
<br>
557
558
If the visualized assay is of a type "spot", you can crop the image to encapsulate the smallest subset that include all spots.
559
560
```{r eval = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
561
vrSpatialPlot(visium_data, group.by = "Sample", crop = TRUE)
562
```
563
564
<img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_spcrop.png" class="center">
565
566
<br>
567
568
The **vrSpatialFeaturePlot** functions the same way as vrSpatialPlot but requires extra arguements such as **features** for selecting features, **norm** for normalized expression (default), and **log** for log transformed counts.
569
570
```{r eval = FALSE, class.source="watch-out"}
571
vrSpatialFeaturePlot(visium_data, features = "Count")
572
vrSpatialFeaturePlot(visium_data, features = "Stat1", norm = TRUE)
573
```
574
575
```{r eval = FALSE, echo = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=12}
576
g1 <- vrSpatialFeaturePlot(visium_data, features = "Count")
577
g2 <- vrSpatialFeaturePlot(visium_data, features = "Stat1", norm = TRUE)
578
g1 | g2
579
```
580
581
<img width="100%" height="100%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_spfeature.png" class="center">
582
583
<br>
584
585
For all variations of **vrSpatialPlot** and **vrSpatialFeaturePlot** functions above, you can specifiy the assay names or assay class.
586
587
```{r eval = FALSE, class.source="watch-out"}
588
vrSpatialPlot(visium_data, assay = "Visium", plot.segments = TRUE)
589
vrSpatialPlot(visium_data, assay = "Assay1", plot.segments = TRUE)
590
vrSpatialFeaturePlot(visium_data, assay = "Visium", features = "Count")
591
vrSpatialFeaturePlot(visium_data, assay = "Assay1", features = "Count")
592
```
593
594
<br>
595
596
### Spatial Plots (Multi-Layer)
597
598
**vrSpatialPlot** function can be paired with the **addSpatialLayer** function to add additional assays of the same spatial coordinate system as the original assay. We use the piping operator "|>" to connect to functions which overlays the results of the first image with the second. **addSpatialLayer** will check if two assays are within the same tissue block and coordinate system, and will overlay these assays if thats the case. 
599
600
This utility can be used to visualize molecules along with cell segments. Here we can also color each individual molecule (gene) type.
601
602
```{r eval = TRUE, class.source="watch-out"}
603
library(ggnewscale)
604
```
605
606
```{r eval = TRUE, class.source="watch-out", fig.height=5, fig.width=6, fig.align='center', out.width="60%"}
607
vrSpatialPlot(merged_object, plot.segments = TRUE, group.by = "clusters") |>
608
  addSpatialLayer(merged_object, assay = "Assay2", group.by = "gene", alpha = 1, 
609
                  colors = list(KRT15 = "blue", KRT14 = "green"))
610
```
611
612
<br>
613
614
You can also visualize the segments that represents annotations of the tissue sections along with the cells.
615
616
```{r eval = TRUE, class.source="watch-out", fig.height=5, fig.width=6, fig.align='center', out.width="60%"}
617
vrSpatialPlot(merged_object, plot.segments = FALSE, group.by = "clusters") |>
618
  addSpatialLayer(merged_object, assay = "Assay3", group.by = "Region", alpha = 0.3, 
619
                  color = list(Region1 = "blue", Region2 = "yellow"))
620
```
621
622
<br>
623
624
### Embedding Plots
625
626
Dimensional reduction and embedding features are also possible for the VoltRon objects.
627
628
```{r, eval = FALSE, class.source="watch-out", fig.align='center', fig.height=5, fig.width=6, out.width="60%"}
629
vrEmbeddingPlot(xenium_data, embedding = "umap", group.by = "clusters", label = T)
630
```
631
632
<img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_embed.png" class="center">
633
634
<br>
635
636
The **vrEmbeddingFeaturePlot** functions the same way as vrEmbeddingPlot but requires extra arguements such as **features** for selecting features, **norm** for normalized expression (default), and **log** for log transformed counts.
637
638
```{r eval = FALSE, class.source="watch-out"}
639
vrEmbeddingFeaturePlot(xenium_data, embedding = "umap", features = "Count")
640
vrEmbeddingFeaturePlot(xenium_data, embedding = "umap", features = "KRT5", norm = FALSE)
641
```
642
643
```{r echo=FALSE, eval = FALSE, class.source="watch-out", fig.height=5, fig.width=12, fig.align='center'}
644
g1 <- vrEmbeddingFeaturePlot(xenium_data, embedding = "umap", features = "Count")
645
g2 <- vrEmbeddingFeaturePlot(xenium_data, embedding = "umap", features = "KRT5", norm = FALSE)
646
g1 | g2
647
```
648
649
<img width="100%" height="100%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_embedfeature.png" class="center">
650
651
<br>
652
653
For all variations of **vrEmbeddingPlot** and **vrEmbeddingFeaturePlot** functions above, you can specifiy the assay names or assay class.
654
655
```{r eval = FALSE, class.source="watch-out"}
656
vrEmbeddingPlot(xenium_data, assay = "Xenium", embedding = "umap")
657
vrEmbeddingPlot(xenium_data, assay = "Assay1", embedding = "umap")
658
vrEmbeddingFeaturePlot(xenium_data, assay = "Xenium", embedding = "umap", features = "Count")
659
vrEmbeddingFeaturePlot(xenium_data, assay = "Assay1", embedding = "umap", features = "Count")
660
```