-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.qmd
85 lines (57 loc) · 2.03 KB
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
title: "mPFC-web"
author: ZhengHu
date: 2023.07.12
---
# Barcode image
This just a test!
```{r}
#| echo: false
library(vitessceR)
base_url <- "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/linnarsson/"
# Create Vitessce view config
vc <- VitessceConfig$new("Codeluppi et al., Nature Methods 2018")
dataset <- vc$add_dataset("Codeluppi")$add_file(
url = paste0(base_url, "linnarsson.cells.json"),
data_type = DataType$CELLS,
file_type = FileType$CELLS_JSON
)$add_file(
url = paste0(base_url, "linnarsson.cell-sets.json"),
data_type = DataType$CELL_SETS,
file_type = FileType$CELL_SETS_JSON
)$add_file(
url = paste0(base_url, "linnarsson.molecules.json"),
data_type = DataType$MOLECULES,
file_type = FileType$MOLECULES_JSON
)$add_file(
url = paste0(base_url, "linnarsson.clusters.json"),
data_type = DataType$EXPRESSION_MATRIX,
file_type = FileType$CLUSTERS_JSON
)$add_file(
url = paste0(base_url, "linnarsson.raster.json"),
data_type = DataType$RASTER,
file_type = FileType$RASTER_JSON
)
desc <- vc$add_view(dataset, Component$DESCRIPTION)
desc <- desc$set_props(description = "Codeluppi et al., Nature Methods 2018: Spatial organization of the somatosensory cortex revealed by osmFISH.")
spatial <- vc$add_view(dataset, Component$SPATIAL)
spatial_layers <- vc$add_view(dataset, Component$LAYER_CONTROLLER)
scatterplot_pca <- vc$add_view(dataset, Component$SCATTERPLOT, mapping = "PCA")
scatterplot_tsne <- vc$add_view(dataset, Component$SCATTERPLOT, mapping = "t-SNE")
status <- vc$add_view(dataset, Component$STATUS)
cell_sets <- vc$add_view(dataset, Component$CELL_SETS)
gene_list <- vc$add_view(dataset, Component$GENES)
heatmap <- vc$add_view(dataset, Component$HEATMAP)$set_props(transpose = TRUE)
vc$layout(hconcat(
vconcat(vconcat(desc, status), spatial_layers),
vconcat(heatmap, spatial),
vconcat(scatterplot_tsne, scatterplot_pca),
vconcat(gene_list, cell_sets)
))
```
```{r}
#| message: false
#| echo: false
# Render the Vitessce widget
vc$widget(theme = "light", width = "100%")
```