Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update website examples #910

Merged
merged 7 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 117 additions & 71 deletions vignettes/codex_mouse_spleen.Rmd

Large diffs are not rendered by default.

60 changes: 37 additions & 23 deletions vignettes/configuration.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ if(retry_install){

if(.Platform[['OS.type']] == 'unix') {

conda_full_path = paste0(partial_conda_path,'/','bin/conda')
conda_full_path = paste0(partial_path_to_conda,'/','bin/conda')

# Remove all previous installations
reticulate::conda_remove(envname = env_location,
Expand All @@ -233,7 +233,7 @@ if(retry_install){
python_version = python_version)
}
else if(.Platform[['OS.type']] == 'windows'){
conda_full_path = paste0(partial_conda_path,'/','condabin/conda.bat')
conda_full_path = paste0(partial_path_to_conda,'/','condabin/conda.bat')

# Remove all previous installations
reticulate::conda_remove(envname = env_location,
Expand Down Expand Up @@ -276,36 +276,50 @@ sessionInfo()
```

```{r, eval=FALSE}
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)
R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.3.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale:
[1] LC_COLLATE=English_United States.utf8
[2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] GiottoData_0.1.0 Giotto_3.2.1
[1] Giotto_4.0.2 GiottoClass_0.1.3

loaded via a namespace (and not attached):
[1] Rcpp_1.0.10 pillar_1.9.0 compiler_4.2.2 tools_4.2.2
[5] digest_0.6.30 jsonlite_1.8.3 evaluate_0.20 lifecycle_1.0.3
[9] tibble_3.2.1 gtable_0.3.3 lattice_0.20-45 png_0.1-7
[13] pkgconfig_2.0.3 rlang_1.1.0 Matrix_1.5-1 cli_3.4.1
[17] rstudioapi_0.14 parallel_4.2.2 yaml_2.3.7 xfun_0.38
[21] fastmap_1.1.0 terra_1.7-18 dplyr_1.1.1 knitr_1.42
[25] rappdirs_0.3.3 generics_0.1.3 vctrs_0.6.1 grid_4.2.2
[29] tidyselect_1.2.0 reticulate_1.26 glue_1.6.2 data.table_1.14.6
[33] R6_2.5.1 fansi_1.0.4 rmarkdown_2.21 ggplot2_3.4.1
[37] magrittr_2.0.3 scales_1.2.1 codetools_0.2-18 htmltools_0.5.4
[41] colorspace_2.1-0 utf8_1.2.3 munsell_0.5.0

[1] SummarizedExperiment_1.32.0 gtable_0.3.4 rjson_0.2.21
[4] xfun_0.42 ggplot2_3.4.4 Biobase_2.62.0
[7] lattice_0.22-5 vctrs_0.6.5 tools_4.3.2
[10] bitops_1.0-7 generics_0.1.3 parallel_4.3.2
[13] stats4_4.3.2 tibble_3.2.1 fansi_1.0.6
[16] colorRamp2_0.1.0 pkgconfig_2.0.3 Matrix_1.6-5
[19] checkmate_2.3.1 data.table_1.15.0 S4Vectors_0.40.2
[22] lifecycle_1.0.4 GenomeInfoDbData_1.2.11 compiler_4.3.2
[25] GiottoUtils_0.1.5 munsell_0.5.0 terra_1.7-71
[28] codetools_0.2-19 GenomeInfoDb_1.38.6 htmltools_0.5.7
[31] RCurl_1.98-1.14 yaml_2.3.8 pillar_1.9.0
[34] crayon_1.5.2 SingleCellExperiment_1.24.0 DelayedArray_0.28.0
[37] magick_2.8.2 abind_1.4-5 gtools_3.9.5
[40] tidyselect_1.2.0 digest_0.6.34 dplyr_1.1.4
[43] rprojroot_2.0.4 fastmap_1.1.1 grid_4.3.2
[46] here_1.0.1 colorspace_2.1-0 cli_3.6.2
[49] SparseArray_1.2.3 magrittr_2.0.3 S4Arrays_1.2.0
[52] utf8_1.2.4 withr_3.0.0 backports_1.4.1
[55] scales_1.3.0 rmarkdown_2.25 XVector_0.42.0
[58] matrixStats_1.2.0 reticulate_1.35.0 GiottoVisuals_0.1.4
[61] png_0.1-8 SpatialExperiment_1.12.0 evaluate_0.23
[64] knitr_1.45 GenomicRanges_1.54.1 IRanges_2.36.0
[67] rlang_1.1.3 Rcpp_1.0.12 glue_1.7.0
[70] BiocGenerics_0.48.1 rstudioapi_0.15.0 jsonlite_1.8.8
[73] R6_2.5.1 MatrixGenerics_1.14.0 zlibbioc_1.48.0
```
188 changes: 138 additions & 50 deletions vignettes/github_issues.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ R.version.string
```

```{r, eval=FALSE}
R version 4.0.4 (2021-02-15)
R version 4.3.2 (2023-10-31)
```

- What version of Giotto are you using?
Expand All @@ -32,30 +32,74 @@ packageVersion("Giotto")
```

```{r, eval=FALSE}
2.0.0.9044
4.0.2
```

- Are you using the Giotto environment or your own python path?

```{r, eval=FALSE}
# Check Giotto environment
Giotto:::checkGiottoEnvironment()
Giotto::checkGiottoEnvironment()
```

```{r, eval=FALSE}
giotto environment found at
/Users/natalie_dr/Library/r-miniconda/envs/giotto_env/bin/pythonw
/Users/yuanlab/Library/r-miniconda/envs/giotto_env/bin/pythonw
```

- Show sequential processing steps/commands in the Giotto object

```{r, eval=FALSE}
Giotto:::showProcessingSteps(my_giotto_object)
Giotto::showProcessingSteps(my_giotto_object)
```

```{r, eval=FALSE}
Processing steps:
0_normalize

1_subset

2_filter
name info: tag tag

3_feat_stats

4_cell_stats

5_hvf
name info: hvf HVFplot

6_pca

7_umap

8_tsne

9_nn_network

10_cluster
name info: leiden_clus sNN.pca

11_delaunay_spatial_network
name info: Delaunay_network

12_spatial_network
name info: spatial_network

13_create_metafeat
name info: cluster_metagene

14_pca
name info: custom_pca

15_umap
name info: custom_pca custom_umap

16_nn_network
name info: custom_pca custom_NN

17_cluster
name info: custom_leiden custom_NN
```

- Show the structure of the Giotto object
Expand All @@ -65,48 +109,90 @@ str(my_giotto_object, max.level = 3)
```

```{r, eval=FALSE}
Formal class 'giotto' [package "Giotto"] with 20 slots
..@ expression :List of 1
.. ..$ rna:List of 3
..@ expression_feat : chr "rna"
..@ spatial_locs :List of 1
.. ..$ raw:Classes ‘data.table’ and 'data.frame': 73655 obs. of 4 variables:
.. .. ..- attr(*, ".internal.selfref")=<externalptr>
..@ spatial_info : NULL
..@ cell_metadata :List of 1
.. ..$ rna:Classes ‘data.table’ and 'data.frame': 73655 obs. of 1 variable:
.. .. ..- attr(*, ".internal.selfref")=<externalptr>
..@ feat_metadata :List of 1
.. ..$ rna:Classes ‘data.table’ and 'data.frame': 161 obs. of 1 variable:
.. .. ..- attr(*, ".internal.selfref")=<externalptr>
..@ feat_info : NULL
..@ cell_ID : chr [1:73655] "cell_1" "cell_2" "cell_3" "cell_4" ...
..@ feat_ID :List of 1
.. ..$ rna: chr [1:161] "Ace2" "Adora2a" "Aldh1l1" "Amigo2" ...
..@ spatial_network : NULL
..@ spatial_grid : NULL
..@ spatial_enrichment : NULL
..@ dimension_reduction: NULL
..@ nn_network : NULL
..@ images : NULL
..@ parameters :List of 1
.. ..$ 0_normalize: Named chr [1:13] "my_giotto_object" "standard" "TRUE" "6000" ...
.. .. ..- attr(*, "names")= chr [1:13] "gobject" "norm_methods" "library_size_norm" "scalefactor" ...
..@ instructions :List of 11
.. ..$ python_path: chr "/Users/natalie_dr/Library/r-miniconda/envs/giotto_env/bin/pythonw"
.. ..$ show_plot : logi TRUE
.. ..$ return_plot: logi TRUE
.. ..$ save_plot : logi FALSE
.. ..$ save_dir : chr "/Users/natalie_dr/Desktop/my_giotto/giotto_user_help"
.. ..$ plot_format: chr "png"
.. ..$ dpi : num 300
.. ..$ units : chr "in"
.. ..$ height : num 9
.. ..$ width : num 9
.. ..$ is_docker : logi FALSE
..@ offset_file : NULL
..@ OS_platform : chr "unix"
..@ join_info : NULL
Formal class 'giotto' [package "Giotto"] with 23 slots
..@ expression :List of 1
.. ..$ cell:List of 1
..@ expression_feat : chr "rna"
..@ spatial_locs :List of 1
.. ..$ cell:List of 1
..@ spatial_info : NULL
..@ cell_metadata :List of 1
.. ..$ cell:List of 1
..@ feat_metadata :List of 1
.. ..$ cell:List of 1
..@ feat_info : NULL
..@ cell_ID :List of 1
.. ..$ cell: chr [1:624] "AAAGGGATGTAGCAAG-1" "AAATGGCATGTCTTGT-1" "AAATGGTCAATGTGCC-1" "AAATTAACGGGTAGCT-1" ...
..@ feat_ID :List of 1
.. ..$ rna: chr [1:634] "Gna12" "Ccnd2" "Btbd17" "Sox9" ...
..@ spatial_network :List of 1
.. ..$ cell:List of 2
..@ spatial_grid : NULL
..@ spatial_enrichment :List of 1
.. ..$ cell:List of 1
..@ dimension_reduction:List of 1
.. ..$ cells:List of 1
..@ nn_network :List of 1
.. ..$ cell:List of 1
..@ images : NULL
..@ largeImages :List of 1
.. ..$ image:Formal class 'giottoLargeImage' [package "Giotto"] with 13 slots
..@ parameters :List of 18
.. ..$ 0_normalize : Named chr [1:14] "mini_visium" "raw" "standard" "TRUE" ...
.. .. ..- attr(*, "names")= chr [1:14] "gobject" "expression_values" "norm_methods" "library_size_norm" ...
.. ..$ 1_subset : Named chr [1:12] "gobject" "spat_unit" "feat_type" "selected_cell_ids" ...
.. .. ..- attr(*, "names")= chr [1:12] "gobject" "spat_unit" "feat_type" "cell_ids" ...
.. ..$ 2_filter : Named chr [1:13] "mini_visium" "raw" "1" "5" ...
.. .. ..- attr(*, "names")= chr [1:13] "gobject" "expression_values" "expression_threshold" "feat_det_in_min_cells" ...
.. ..$ 3_feat_stats : Named chr [1:4] "mini_visium" "normalized" "0" "TRUE"
.. .. ..- attr(*, "names")= chr [1:4] "gobject" "expression_values" "detection_threshold" "return_gobject"
.. ..$ 4_cell_stats : Named chr [1:4] "mini_visium" "normalized" "0" "TRUE"
.. .. ..- attr(*, "names")= chr [1:4] "gobject" "expression_values" "detection_threshold" "return_gobject"
.. ..$ 5_hvf : Named chr [1:17] "mini_visium" "normalized" "cov_groups" "FALSE" ...
.. .. ..- attr(*, "names")= chr [1:17] "gobject" "expression_values" "method" "reverse_log_scale" ...
.. ..$ 6_pca : Named chr [1:15] "mini_visium" "normalized" "cells" "hvf" ...
.. .. ..- attr(*, "names")= chr [1:15] "gobject" "expression_values" "reduction" "feats_to_use" ...
.. ..$ 7_umap : Named chr [1:17] "mini_visium" "normalized" "cells" "pca" ...
.. .. ..- attr(*, "names")= chr [1:17] "gobject" "expression_values" "reduction" "dim_reduction_to_use" ...
.. ..$ 8_tsne : Named chr [1:14] "mini_visium" "normalized" "cells" "pca" ...
.. .. ..- attr(*, "names")= chr [1:14] "gobject" "expression_values" "reduction" "dim_reduction_to_use" ...
.. ..$ 9_nn_network : Named chr [1:11] "mini_visium" "sNN" "pca" "1:5" ...
.. .. ..- attr(*, "names")= chr [1:11] "gobject" "type" "dim_reduction_to_use" "dimensions_to_use" ...
.. ..$ 10_cluster : Named chr [1:11] "mini_visium" "leiden_clus" "sNN" "sNN.pca" ...
.. .. ..- attr(*, "names")= chr [1:11] "gobject" "name" "nn_network_to_use" "network_name" ...
.. ..$ 11_delaunay_spatial_network: Named chr [1:4] "dimensions: sdimx and sdimy" "deldir" "auto" "Delaunay_network"
.. .. ..- attr(*, "names")= chr [1:4] "dimensions used" "method" "maximum distance threshold" "name of spatial network"
.. ..$ 12_spatial_network : Named chr [1:4] "10" "all" "400" "spatial_network"
.. .. ..- attr(*, "names")= chr [1:4] "k neighbours" "dimensions used" "maximum distance threshold" "name of spatial network"
.. ..$ 13_create_metafeat : Named chr [1:5] "mini_visium" "normalized" "cluster_genes" "cluster_metagene" ...
.. .. ..- attr(*, "names")= chr [1:5] "gobject" "expression_values" "feat_clusters" "name" ...
.. ..$ 14_pca : Named chr [1:16] "mini_visium" "normalized" "cells" "custom_pca" ...
.. .. ..- attr(*, "names")= chr [1:16] "gobject" "expression_values" "reduction" "name" ...
.. ..$ 15_umap : Named chr [1:19] "mini_visium" "normalized" "cells" "pca" ...
.. .. ..- attr(*, "names")= chr [1:19] "gobject" "expression_values" "reduction" "dim_reduction_to_use" ...
.. ..$ 16_nn_network : Named chr [1:13] "mini_visium" "sNN" "pca" "custom_pca" ...
.. .. ..- attr(*, "names")= chr [1:13] "gobject" "type" "dim_reduction_to_use" "dim_reduction_name" ...
.. ..$ 17_cluster : Named chr [1:11] "mini_visium" "custom_leiden" "sNN" "custom_NN" ...
.. .. ..- attr(*, "names")= chr [1:11] "gobject" "name" "nn_network_to_use" "network_name" ...
..@ instructions :List of 13
.. ..$ python_path : chr "/Users/yuanlab/Library/r-miniconda/envs/giotto_env/bin/pythonw"
.. ..$ show_plot : logi TRUE
.. ..$ return_plot : logi FALSE
.. ..$ save_plot : logi FALSE
.. ..$ save_dir : logi NA
.. ..$ plot_format : chr "png"
.. ..$ dpi : num 300
.. ..$ units : chr "in"
.. ..$ height : num 9
.. ..$ width : num 9
.. ..$ is_docker : logi FALSE
.. ..$ active_spat_unit: chr "cell"
.. ..$ active_feat_type: chr "rna"
..@ offset_file : NULL
..@ OS_platform : chr "unix"
..@ join_info : NULL
..@ multiomics : NULL
..@ h5_file : NULL
```

### Warning Messages
Expand All @@ -115,7 +201,7 @@ Formal class 'giotto' [package "Giotto"] with 20 slots

```{r, eval=FALSE}
my_giotto_object <- createGiottoObject(raw_exprs = "path/to/expression/data",
spatial_locs = "path/to/spatial/data")
spatial_locs = "path/to/spatial/data")
```

```{r, eval=FALSE}
Expand All @@ -128,7 +214,7 @@ In createGiottoObject(raw_exprs = "/Users/username/path/to/data", :

```{r, eval=FALSE}
my_giotto_object <- createGiottoObject(expression = "path/to/expression/data",
spatial_locs = "path/to/spatial/data")
spatial_locs = "path/to/spatial/data")
```

### Errors
Expand Down Expand Up @@ -191,6 +277,8 @@ I am having trouble adjusting my Giotto matix. I have inputted the
following code:

```{r, eval=FALSE}
my_giotto_object <- GiottoData::loadGiottoMini("visium")

my_giotto_object <- adjustGiottoMatrix(gobject = my_giotto_object,
expression_values = c('normalized'),
covariate_columns = c('nr_genes',
Expand All @@ -203,7 +291,7 @@ I expected that my matrix would be appropriately adjusted, but I got the followi
Error in adjustGiottoMatrix(gobject = my_giotto_object, expression_values = c("normalized"): covariate column name(s) were not found in the cell metadata
```

For more context, I am running R version 4.04 and Giotto version 2.0.0.9044. I can send you the data I used if necessary.
For more context, I am running R version 4.3.2 and Giotto version 4.0.2. I can send you the data I used if necessary.

### Example of a Bad GitHub issue

Expand Down
Loading
Loading