Skip to content

Commit

Permalink
update multiomics tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
josschavezf committed Sep 30, 2024
1 parent 546d9c0 commit bddb91f
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 66 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/images/visium_cytassist_human_glioblastoma/7-UMAP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/images/visium_cytassist_human_glioblastoma/8-UMAP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
140 changes: 74 additions & 66 deletions vignettes/visium_cytassist_human_glioblastoma.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ The [Human glioblastoma (FFPE) dataset](https://www.10xgenomics.com/resources/da

More information about this dataset can be found [here](https://www.10xgenomics.com/resources/datasets/gene-and-protein-expression-library-of-human-glioblastoma-cytassist-ffpe-2-standard).

# Download dataset

```{r, eval=FALSE}
dir.create("data")
download.file(url = "https://cf.10xgenomics.com/samples/spatial-exp/2.1.0/CytAssist_FFPE_Protein_Expression_Human_Glioblastoma/CytAssist_FFPE_Protein_Expression_Human_Glioblastoma_raw_feature_bc_matrix.tar.gz",
destfile = "data/CytAssist_FFPE_Protein_Expression_Human_Glioblastoma_raw_feature_bc_matrix.tar.gz")
download.file(url = "https://cf.10xgenomics.com/samples/spatial-exp/2.1.0/CytAssist_FFPE_Protein_Expression_Human_Glioblastoma/CytAssist_FFPE_Protein_Expression_Human_Glioblastoma_spatial.tar.gz",
destfile = "data/CytAssist_FFPE_Protein_Expression_Human_Glioblastoma_spatial.tar.gz")
untar("data/CytAssist_FFPE_Protein_Expression_Human_Glioblastoma_raw_feature_bc_matrix.tar.gz",
exdir = "data")
untar("data/CytAssist_FFPE_Protein_Expression_Human_Glioblastoma_spatial.tar.gz",
exdir = "data")
```

# Start Giotto

```{r, eval=FALSE}
Expand Down Expand Up @@ -107,7 +124,7 @@ spatPlot2D(gobject = visium,
point_alpha = 0.7)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/0-spatPlot2D.png")
```

Expand Down Expand Up @@ -135,7 +152,7 @@ spatPlot2D(gobject = visium,
color_as_factor = FALSE)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/1-spatPlot2D.png")
```

Expand Down Expand Up @@ -169,7 +186,7 @@ spatPlot2D(gobject = visium,
color_as_factor = FALSE)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/2-spatPlot2D.png")
```

Expand All @@ -189,7 +206,7 @@ visium <- runPCA(gobject = visium)
screePlot(visium, ncp = 30)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/3-screePlot.png")
```

Expand All @@ -198,7 +215,7 @@ knitr::include_graphics("images/visium_cytassist_human_glioblastoma/3-screePlot.
plotPCA(gobject = visium)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/4-PCA.png")
```

Expand All @@ -214,7 +231,7 @@ screePlot(visium,
ncp = 30)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/5-screePlot.png")
```

Expand All @@ -225,7 +242,7 @@ plotPCA(gobject = visium,
feat_type = "protein")
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/6-PCA.png")
```

Expand Down Expand Up @@ -273,7 +290,7 @@ plotUMAP(gobject = visium,
point_size = 2)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/7-UMAP.png")
```

Expand All @@ -292,7 +309,7 @@ plotUMAP(gobject = visium,
point_size = 2)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/8-UMAP.png")
```

Expand All @@ -306,7 +323,7 @@ spatPlot2D(gobject = visium,
point_size = 2)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/9-spatPlot2D.png")
```

Expand All @@ -320,7 +337,7 @@ spatPlot2D(gobject = visium,
point_size = 2)
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/10-spatPlot2D.png")
```

Expand Down Expand Up @@ -348,23 +365,15 @@ visium <- createNearestNetwork(gobject = visium,
# Run WNN
visium <- runWNN(visium,
spat_unit = "cell",
modality_1 = "rna",
modality_2 = "protein",
pca_name_modality_1 = "pca",
pca_name_modality_2 = "protein.pca",
feat_types = c("rna", "protein"),
reduction_methods = c("pca", "pca"),
reduction_names = c("pca", "protein.pca"),
k = 20,
integrated_feat_type = NULL,
matrix_result_name = NULL,
w_name_modality_1 = NULL,
w_name_modality_2 = NULL,
verbose = TRUE)
# Run Integrated umap
visium <- runIntegratedUMAP(visium,
modality1 = "rna",
modality2 = "protein",
spread = 5,
min_dist = 0.5,
feat_types = c("rna", "protein"),
force = FALSE)
# Calculate integrated clusters
Expand All @@ -374,7 +383,7 @@ visium <- doLeidenCluster(gobject = visium,
nn_network_to_use = "kNN",
network_name = "integrated_kNN",
name = "integrated_leiden_clus",
resolution = 1)
resolution = 0.5)
# Visualize integrated umap
plotUMAP(gobject = visium,
Expand All @@ -388,7 +397,7 @@ plotUMAP(gobject = visium,
axis_text = 10 )
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/11-UMAP.png")
```

Expand All @@ -403,7 +412,7 @@ spatPlot2D(visium,
title = "Integrated Leiden clustering")
```

```{r, echo=FALSE, out.width="60%"}
```{r, echo=FALSE, out.width="60%", fig.align='center'}
knitr::include_graphics("images/visium_cytassist_human_glioblastoma/12-spatPlot2D.png")
```

Expand All @@ -414,9 +423,9 @@ sessionInfo()
```

```{r, eval=FALSE}
R version 4.4.0 (2024-04-24)
R version 4.4.1 (2024-06-14)
Platform: x86_64-apple-darwin20
Running under: macOS Sonoma 14.5
Running under: macOS 15.0
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
Expand All @@ -432,45 +441,44 @@ attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Giotto_4.1.0 GiottoClass_0.3.4
[1] Giotto_4.1.3 GiottoClass_0.4.0
loaded via a namespace (and not attached):
[1] colorRamp2_0.1.0 deldir_2.0-4 rlang_1.1.4
[4] magrittr_2.0.3 RcppAnnoy_0.0.22 GiottoUtils_0.1.10
[7] matrixStats_1.3.0 compiler_4.4.0 png_0.1-8
[10] systemfonts_1.1.0 vctrs_0.6.5 reshape2_1.4.4
[13] stringr_1.5.1 pkgconfig_2.0.3 SpatialExperiment_1.14.0
[16] crayon_1.5.3 fastmap_1.2.0 backports_1.5.0
[19] magick_2.8.4 XVector_0.44.0 labeling_0.4.3
[22] utf8_1.2.4 rmarkdown_2.27 UCSC.utils_1.0.0
[25] ragg_1.3.2 purrr_1.0.2 xfun_0.46
[28] beachmat_2.20.0 zlibbioc_1.50.0 GenomeInfoDb_1.40.1
[31] jsonlite_1.8.8 DelayedArray_0.30.1 BiocParallel_1.38.0
[34] terra_1.7-78 irlba_2.3.5.1 parallel_4.4.0
[37] R6_2.5.1 stringi_1.8.4 RColorBrewer_1.1-3
[40] reticulate_1.38.0 parallelly_1.38.0 GenomicRanges_1.56.1
[43] scattermore_1.2 Rcpp_1.0.13 SummarizedExperiment_1.34.0
[46] knitr_1.48 future.apply_1.11.2 R.utils_2.12.3
[49] IRanges_2.38.1 Matrix_1.7-0 igraph_2.0.3
[52] tidyselect_1.2.1 rstudioapi_0.16.0 abind_1.4-5
[55] yaml_2.3.10 codetools_0.2-20 listenv_0.9.1
[58] lattice_0.22-6 tibble_3.2.1 plyr_1.8.9
[61] Biobase_2.64.0 withr_3.0.0 evaluate_0.24.0
[64] future_1.34.0 pillar_1.9.0 MatrixGenerics_1.16.0
[67] checkmate_2.3.2 stats4_4.4.0 plotly_4.10.4
[70] generics_0.1.3 dbscan_1.2-0 sp_2.1-4
[73] S4Vectors_0.42.1 ggplot2_3.5.1 munsell_0.5.1
[76] scales_1.3.0 globals_0.16.3 gtools_3.9.5
[79] glue_1.7.0 lazyeval_0.2.2 tools_4.4.0
[82] GiottoVisuals_0.2.4 data.table_1.15.4 ScaledMatrix_1.12.0
[85] cowplot_1.1.3 grid_4.4.0 tidyr_1.3.1
[88] colorspace_2.1-1 SingleCellExperiment_1.26.0 GenomeInfoDbData_1.2.12
[91] BiocSingular_1.20.0 rsvd_1.0.5 cli_3.6.3
[94] textshaping_0.4.0 fansi_1.0.6 S4Arrays_1.4.1
[97] viridisLite_0.4.2 dplyr_1.1.4 uwot_0.2.2
[100] gtable_0.3.5 R.methodsS3_1.8.2 digest_0.6.36
[103] BiocGenerics_0.50.0 SparseArray_1.4.8 ggrepel_0.9.5
[106] rjson_0.2.21 htmlwidgets_1.6.4 farver_2.1.2
[109] htmltools_0.5.8.1 R.oo_1.26.0 lifecycle_1.0.4
[112] httr_1.4.7
[4] magrittr_2.0.3 RcppAnnoy_0.0.22 GiottoUtils_0.1.12
[7] matrixStats_1.4.1 compiler_4.4.1 png_0.1-8
[10] systemfonts_1.1.0 vctrs_0.6.5 pkgconfig_2.0.3
[13] SpatialExperiment_1.14.0 crayon_1.5.3 fastmap_1.2.0
[16] backports_1.5.0 magick_2.8.5 XVector_0.44.0
[19] labeling_0.4.3 utf8_1.2.4 rmarkdown_2.28
[22] UCSC.utils_1.0.0 ragg_1.3.3 purrr_1.0.2
[25] xfun_0.47 beachmat_2.20.0 zlibbioc_1.50.0
[28] GenomeInfoDb_1.40.1 jsonlite_1.8.9 DelayedArray_0.30.1
[31] BiocParallel_1.38.0 terra_1.7-78 irlba_2.3.5.1
[34] parallel_4.4.1 R6_2.5.1 RColorBrewer_1.1-3
[37] reticulate_1.39.0 parallelly_1.38.0 GenomicRanges_1.56.1
[40] scattermore_1.2 Rcpp_1.0.13 SummarizedExperiment_1.34.0
[43] knitr_1.48 future.apply_1.11.2 R.utils_2.12.3
[46] IRanges_2.38.1 Matrix_1.7-0 igraph_2.0.3
[49] tidyselect_1.2.1 rstudioapi_0.16.0 abind_1.4-8
[52] yaml_2.3.10 codetools_0.2-20 listenv_0.9.1
[55] lattice_0.22-6 tibble_3.2.1 Biobase_2.64.0
[58] withr_3.0.1 evaluate_1.0.0 future_1.34.0
[61] pillar_1.9.0 MatrixGenerics_1.16.0 checkmate_2.3.2
[64] stats4_4.4.1 plotly_4.10.4 generics_0.1.3
[67] dbscan_1.2-0 sp_2.1-4 S4Vectors_0.42.1
[70] ggplot2_3.5.1 munsell_0.5.1 scales_1.3.0
[73] gtools_3.9.5 globals_0.16.3 glue_1.7.0
[76] lazyeval_0.2.2 tools_4.4.1 GiottoVisuals_0.2.5
[79] data.table_1.16.0 ScaledMatrix_1.12.0 cowplot_1.1.3
[82] grid_4.4.1 tidyr_1.3.1 colorspace_2.1-1
[85] SingleCellExperiment_1.26.0 GenomeInfoDbData_1.2.12 BiocSingular_1.20.0
[88] rsvd_1.0.5 cli_3.6.3 textshaping_0.4.0
[91] fansi_1.0.6 S4Arrays_1.4.1 viridisLite_0.4.2
[94] dplyr_1.1.4 uwot_0.2.2 gtable_0.3.5
[97] R.methodsS3_1.8.2 digest_0.6.37 BiocGenerics_0.50.0
[100] SparseArray_1.4.8 ggrepel_0.9.6 rjson_0.2.23
[103] htmlwidgets_1.6.4 farver_2.1.2 htmltools_0.5.8.1
[106] R.oo_1.26.0 lifecycle_1.0.4 httr_1.4.7
```

0 comments on commit bddb91f

Please sign in to comment.