diff --git a/404.html b/404.html index 6d685fd..b7bc0a7 100644 --- a/404.html +++ b/404.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • diff --git a/_main_files/figure-html/assigned_vs_ann_heatmap-1.png b/_main_files/figure-html/assigned_vs_ann_heatmap-1.png new file mode 100644 index 0000000..65e6c5d Binary files /dev/null and b/_main_files/figure-html/assigned_vs_ann_heatmap-1.png differ diff --git a/_main_files/figure-html/auc_explore_plots-1.png b/_main_files/figure-html/auc_explore_plots-1.png new file mode 100644 index 0000000..5ecc6ac Binary files /dev/null and b/_main_files/figure-html/auc_explore_plots-1.png differ diff --git a/_main_files/figure-html/lessRes_clustering-1.png b/_main_files/figure-html/lessRes_clustering-1.png new file mode 100644 index 0000000..1eac944 Binary files /dev/null and b/_main_files/figure-html/lessRes_clustering-1.png differ diff --git a/_main_files/figure-html/plotDots_markers-1.png b/_main_files/figure-html/plotDots_markers-1.png new file mode 100644 index 0000000..d0570b6 Binary files /dev/null and b/_main_files/figure-html/plotDots_markers-1.png differ diff --git a/_main_files/figure-html/plot_markergenes1-1.png b/_main_files/figure-html/plot_markergenes1-1.png new file mode 100644 index 0000000..34737c8 Binary files /dev/null and b/_main_files/figure-html/plot_markergenes1-1.png differ diff --git a/_main_files/figure-html/plot_markers_byblock-1.png b/_main_files/figure-html/plot_markers_byblock-1.png new file mode 100644 index 0000000..1e621b7 Binary files /dev/null and b/_main_files/figure-html/plot_markers_byblock-1.png differ diff --git a/_main_files/figure-html/predicted_vs_clusters_heatmap-1.png b/_main_files/figure-html/predicted_vs_clusters_heatmap-1.png new file mode 100644 index 0000000..27924fd Binary files /dev/null and b/_main_files/figure-html/predicted_vs_clusters_heatmap-1.png differ diff --git a/_main_files/figure-html/set_PBMC_dataset-1.png b/_main_files/figure-html/set_PBMC_dataset-1.png new file mode 100644 index 0000000..71157ca Binary files /dev/null and b/_main_files/figure-html/set_PBMC_dataset-1.png differ diff --git a/_main_files/figure-html/set_PBMC_dataset-2.png b/_main_files/figure-html/set_PBMC_dataset-2.png new file mode 100644 index 0000000..6631509 Binary files /dev/null and b/_main_files/figure-html/set_PBMC_dataset-2.png differ diff --git a/_main_files/figure-html/top_markers_heatmap-1.png b/_main_files/figure-html/top_markers_heatmap-1.png new file mode 100644 index 0000000..6d9c7b7 Binary files /dev/null and b/_main_files/figure-html/top_markers_heatmap-1.png differ diff --git a/_main_files/figure-html/unnamed-chunk-16-1.png b/_main_files/figure-html/unnamed-chunk-16-1.png index c751a3a..6b3d8c2 100644 Binary files a/_main_files/figure-html/unnamed-chunk-16-1.png and b/_main_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/_main_files/figure-html/unnamed-chunk-17-1.png b/_main_files/figure-html/unnamed-chunk-17-1.png index c8ba156..d38e25d 100644 Binary files a/_main_files/figure-html/unnamed-chunk-17-1.png and b/_main_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/biocthis-introduction.html b/biocthis-introduction.html index aaeb7ff..53b8298 100644 --- a/biocthis-introduction.html +++ b/biocthis-introduction.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • @@ -447,9 +464,9 @@

    10.3.1 Example function paste0(date_weekday, ": ", praise::praise()) } weekday_praise() -#> [1] "Monday: You are exquisite!" +#> [1] "Tuesday: You are super!"
    weekday_praise("2024-06-09")
    -#> [1] "Sunday: You are brilliant!"
    +#> [1] "Sunday: You are dandy!"

    Here’s the full code for the function and its documentation.

    #' Praise a weekday
     #'
    diff --git a/dge-model-building-with-variancepartition.html b/dge-model-building-with-variancepartition.html
    index 881bbc2..a0fee53 100644
    --- a/dge-model-building-with-variancepartition.html
    +++ b/dge-model-building-with-variancepartition.html
    @@ -314,8 +314,25 @@
     
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • diff --git a/differential-gene-expression-analysis-overview.html b/differential-gene-expression-analysis-overview.html index 12819cd..ce5aeaa 100644 --- a/differential-gene-expression-analysis-overview.html +++ b/differential-gene-expression-analysis-overview.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • diff --git a/differential-gene-expression-analysis-with-limma-voom.html b/differential-gene-expression-analysis-with-limma-voom.html index 1b2ad06..1c4e1bb 100644 --- a/differential-gene-expression-analysis-with-limma-voom.html +++ b/differential-gene-expression-analysis-with-limma-voom.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • diff --git a/differential-gene-expression-exercise.html b/differential-gene-expression-exercise.html index 7092ce3..e4e425a 100644 --- a/differential-gene-expression-exercise.html +++ b/differential-gene-expression-exercise.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • diff --git a/final-r-session.html b/final-r-session.html index 30bdcf3..904369b 100644 --- a/final-r-session.html +++ b/final-r-session.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • @@ -396,7 +413,7 @@

    Final R Session
    curl::curl_version()
    -#> $version
    -#> [1] "7.81.0"
    -#> 
    -#> $ssl_version
    -#> [1] "OpenSSL/3.0.2"
    -#> 
    -#> $libz_version
    -#> [1] "1.2.11"
    -#> 
    -#> $libssh_version
    -#> [1] "libssh/0.9.6/openssl/zlib"
    -#> 
    -#> $libidn_version
    -#> [1] "2.3.2"
    -#> 
    -#> $host
    -#> [1] "x86_64-pc-linux-gnu"
    -#> 
    -#> $protocols
    -#>  [1] "dict"    "file"    "ftp"     "ftps"    "gopher"  "gophers" "http"    "https"   "imap"    "imaps"   "ldap"   
    -#> [12] "ldaps"   "mqtt"    "pop3"    "pop3s"   "rtmp"    "rtsp"    "scp"     "sftp"    "smb"     "smbs"    "smtp"   
    -#> [23] "smtps"   "telnet"  "tftp"   
    -#> 
    -#> $ipv6
    -#> [1] TRUE
    -#> 
    -#> $http2
    -#> [1] TRUE
    -#> 
    -#> $idn
    -#> [1] TRUE

    -

    This interactive book was last updated at 2024-06-10 23:30:30.562128.

    +
    curl::curl_version()
    +#> $version
    +#> [1] "7.81.0"
    +#> 
    +#> $ssl_version
    +#> [1] "OpenSSL/3.0.2"
    +#> 
    +#> $libz_version
    +#> [1] "1.2.11"
    +#> 
    +#> $libssh_version
    +#> [1] "libssh/0.9.6/openssl/zlib"
    +#> 
    +#> $libidn_version
    +#> [1] "2.3.2"
    +#> 
    +#> $host
    +#> [1] "x86_64-pc-linux-gnu"
    +#> 
    +#> $protocols
    +#>  [1] "dict"    "file"    "ftp"     "ftps"    "gopher"  "gophers" "http"    "https"   "imap"    "imaps"   "ldap"   
    +#> [12] "ldaps"   "mqtt"    "pop3"    "pop3s"   "rtmp"    "rtsp"    "scp"     "sftp"    "smb"     "smbs"    "smtp"   
    +#> [23] "smtps"   "telnet"  "tftp"   
    +#> 
    +#> $ipv6
    +#> [1] TRUE
    +#> 
    +#> $http2
    +#> [1] TRUE
    +#> 
    +#> $idn
    +#> [1] TRUE
    +

    This interactive book was last updated at 2024-06-11 11:00:51.293221.

    ##    user  system elapsed 
    -##  13.821   1.070  14.742
    +## 14.294 0.998 15.070

    System curl version:

    curl::curl_version()
    ## $version
    @@ -846,7 +863,7 @@ 

    R session information

    License

    diff --git a/interactive-summarizedexperiment-visualizations.html b/interactive-summarizedexperiment-visualizations.html index d7643a1..5b54c08 100644 --- a/interactive-summarizedexperiment-visualizations.html +++ b/interactive-summarizedexperiment-visualizations.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • @@ -668,7 +685,7 @@

    2.4.1 Setting up the data
    ## Lets get some data using spatialLIBD
     sce_layer <- spatialLIBD::fetch_data("sce_layer")
     #> adding rname 'https://www.dropbox.com/s/bg8xwysh2vnjwvg/Human_DLPFC_Visium_processedData_sce_scran_sce_layer_spatialLIBD.Rdata?dl=1'
    -#> 2024-06-10 23:27:14.700913 loading file /github/home/.cache/R/BiocFileCache/3993f119bd3_Human_DLPFC_Visium_processedData_sce_scran_sce_layer_spatialLIBD.Rdata%3Fdl%3D1
    +#> 2024-06-11 10:55:10.106743 loading file /github/home/.cache/R/BiocFileCache/4764df94b32_Human_DLPFC_Visium_processedData_sce_scran_sce_layer_spatialLIBD.Rdata%3Fdl%3D1

    sce_layer
     #> class: SingleCellExperiment 
     #> dim: 22331 76 
    diff --git a/interpreting-model-coefficients-with-exploremodelmatrix.html b/interpreting-model-coefficients-with-exploremodelmatrix.html
    index 840e15c..3865b2f 100644
    --- a/interpreting-model-coefficients-with-exploremodelmatrix.html
    +++ b/interpreting-model-coefficients-with-exploremodelmatrix.html
    @@ -314,8 +314,25 @@
     
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • diff --git a/introduction-to-spatial-transcriptomics.html b/introduction-to-spatial-transcriptomics.html index 9e3c727..d265f5e 100644 --- a/introduction-to-spatial-transcriptomics.html +++ b/introduction-to-spatial-transcriptomics.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • diff --git a/making-your-own-website-with-postcards.html b/making-your-own-website-with-postcards.html index faf2090..1657705 100644 --- a/making-your-own-website-with-postcards.html +++ b/making-your-own-website-with-postcards.html @@ -314,8 +314,25 @@
  • 11.8.3 Hierarchical clustering
  • 11.8.4 Subclustering
  • -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • @@ -401,131 +418,131 @@

    14.1 here
    ## Install the package manually
    -# install.packages("here")
    -
    -## Load "here" (previously installed)
    -library("here")

    +
    ## Install the package manually
    +# install.packages("here")
    +
    +## Load "here" (previously installed)
    +library("here")

    Sometimes there might be an error, as it might clash with other packages (like plyr). To avoid this, we can use here::here() (which basically clarifies that the requested function is from the here package).

    -
    here::here()
    -#> [1] "/__w/cshl_rstats_genome_scale_2024/cshl_rstats_genome_scale_2024"
    +
    here::here()
    +#> [1] "/__w/cshl_rstats_genome_scale_2024/cshl_rstats_genome_scale_2024"

    Some useful commands are getwd() and setwd(), which deal with the working directory, which is the default location where R looks for files to read or save.

    -
    getwd() # returns the current path
    -setwd("desired/directory") # changes to the specified path
    +
    getwd() # returns the current path
    +setwd("desired/directory") # changes to the specified path

    Best Practice:

    Instead of using “setwd” to manually set your working directory, it is often better to use the “here” package. Using “here” avoids issues with hard-coded paths and ensures your scripts work regardless of the specific setup of your working environment.

    -
    ## Instead of "C:/Users/user/Desktop/data/myfile.csv"
    -
    -## Use here to construct file paths
    -file_path <- here("Users", "user", "Desktop", "data", "myfile.csv")
    -# file_path <- here:here("Users", "user", "Desktop","data", "myfile.csv")
    -data <- read.csv(file_path)
    +
    ## Instead of "C:/Users/user/Desktop/data/myfile.csv"
    +
    +## Use here to construct file paths
    +file_path <- here("Users", "user", "Desktop", "data", "myfile.csv")
    +# file_path <- here:here("Users", "user", "Desktop","data", "myfile.csv")
    +data <- read.csv(file_path)

    Other examples of how “here” could be used:

    -
    ## Example: save data to a file and load it
    -a <- 1
    -c <- 23
    -
    -save(a, c, file = here("test-data.RData"))
    -# save(a, c, file = here:here("test-data.RData"))
    -load(here("test-data.RData"))
    -# load(here:here("test-data.RData"))
    -
    -## Create a directory
    -dir.create(here("subdirectory"), showWarnings = FALSE)
    -# dir.create(here:here("subdirectory"), showWarnings = FALSE)
    -
    -## Create a file, indicating the subdirectory (the first argument in this case)
    -file.create(here("subdirectory", "filename"))
    -#> [1] TRUE
    -
    # file.create(here:here("subdirectory", "filename"))
    -
    -## Open the new created file
    -file.show(here("subdirectory", "filename"))
    -# file.show(here:here("subdirectory", "filename"))
    -
    -## For example, if we want to see our files in the directory
    -list.files(here(), recursive = TRUE)
    -#>  [1] "_main_files/figure-html/CCA-1.png"                         
    -#>  [2] "_main_files/figure-html/cut_dendogram-1.png"               
    -#>  [3] "_main_files/figure-html/cut_dendogram-2.png"               
    -#>  [4] "_main_files/figure-html/EMM_example1-1.png"                
    -#>  [5] "_main_files/figure-html/heat map-1.png"                    
    -#>  [6] "_main_files/figure-html/hist_libSizeFactors-1.png"         
    -#>  [7] "_main_files/figure-html/hist_p-1.png"                      
    -#>  [8] "_main_files/figure-html/modelGeneVar_batch-1.png"          
    -#>  [9] "_main_files/figure-html/modelGeneVar_zeisel-1.png"         
    -#> [10] "_main_files/figure-html/modelGeneVarByPoisson_zeisel-1.png"
    -#> [11] "_main_files/figure-html/modelGeneVarWithSpikes_416b-1.png" 
    -#> [12] "_main_files/figure-html/PCs_zeisel-1.png"                  
    -#> [13] "_main_files/figure-html/plot_clusters_zeisel-1.png"        
    -#> [14] "_main_files/figure-html/plot_dendogram-1.png"              
    -#> [15] "_main_files/figure-html/Plot_multiplePCA_PCs-1.png"        
    -#> [16] "_main_files/figure-html/QC_sce416b_plots-1.png"            
    -#> [17] "_main_files/figure-html/runTSNE_zeisel-1.png"              
    -#> [18] "_main_files/figure-html/TSNE_perplexity_plots-1.png"       
    -#> [19] "_main_files/figure-html/Umap_zeisel-1.png"                 
    -#> [20] "_main_files/figure-html/unnamed-chunk-14-1.png"            
    -#> [21] "_main_files/figure-html/unnamed-chunk-15-1.png"            
    -#> [22] "_main_files/figure-html/unnamed-chunk-16-1.png"            
    -#> [23] "_main_files/figure-html/unnamed-chunk-17-1.png"            
    -#> [24] "_main_files/figure-html/unnamed-chunk-18-1.png"            
    -#> [25] "_main_files/figure-html/unnamed-chunk-19-1.png"            
    -#> [26] "_main_files/figure-html/VarExplained_PCs-1.png"            
    -#> [27] "_main_files/figure-html/volcano plot-1.png"                
    -#> [28] "_main_files/figure-html/voom-1.png"                        
    -#> [29] "_main.Rmd"                                                 
    -#> [30] "01_SummarizedExperiment.R"                                 
    -#> [31] "01_SummarizedExperiment.Rmd"                               
    -#> [32] "02_iSEE.R"                                                 
    -#> [33] "02_iSEE.Rmd"                                               
    -#> [34] "03_recount3_intro.R"                                       
    -#> [35] "03_recount3_intro.Rmd"                                     
    -#> [36] "04_DGE_analysis_overview.R"                                
    -#> [37] "04_DGE_analysis_overview.Rmd"                              
    -#> [38] "05_DGE_with_limma_voom.R"                                  
    -#> [39] "05_DGE_with_limma_voom.Rmd"                                
    -#> [40] "06_ExploreModelMatrix.R"                                   
    -#> [41] "06_ExploreModelMatrix.Rmd"                                 
    -#> [42] "07_model_variable_selection.R"                             
    -#> [43] "07_model_variable_selection.Rmd"                           
    -#> [44] "08_DEG_exercise.R"                                         
    -#> [45] "08_DEG_exercise.Rmd"                                       
    -#> [46] "09_research_talks.R"                                       
    -#> [47] "09_research_talks.Rmd"                                     
    -#> [48] "10_biocthis_intro.R"                                       
    -#> [49] "10_biocthis_intro.Rmd"                                     
    -#> [50] "11_scRNAseq_overview.R"                                    
    -#>  [ reached getOption("max.print") -- omitted 58 entries ]
    -
    # list.files(here:here(), recursive = TRUE)
    +
    ## Example: save data to a file and load it
    +a <- 1
    +c <- 23
    +
    +save(a, c, file = here("test-data.RData"))
    +# save(a, c, file = here:here("test-data.RData"))
    +load(here("test-data.RData"))
    +# load(here:here("test-data.RData"))
    +
    +## Create a directory
    +dir.create(here("subdirectory"), showWarnings = FALSE)
    +# dir.create(here:here("subdirectory"), showWarnings = FALSE)
    +
    +## Create a file, indicating the subdirectory (the first argument in this case)
    +file.create(here("subdirectory", "filename"))
    +#> [1] TRUE
    +
    # file.create(here:here("subdirectory", "filename"))
    +
    +## Open the new created file
    +file.show(here("subdirectory", "filename"))
    +# file.show(here:here("subdirectory", "filename"))
    +
    +## For example, if we want to see our files in the directory
    +list.files(here(), recursive = TRUE)
    +#>  [1] "_main_files/figure-html/assigned_vs_ann_heatmap-1.png"      
    +#>  [2] "_main_files/figure-html/auc_explore_plots-1.png"            
    +#>  [3] "_main_files/figure-html/CCA-1.png"                          
    +#>  [4] "_main_files/figure-html/cut_dendogram-1.png"                
    +#>  [5] "_main_files/figure-html/cut_dendogram-2.png"                
    +#>  [6] "_main_files/figure-html/EMM_example1-1.png"                 
    +#>  [7] "_main_files/figure-html/heat map-1.png"                     
    +#>  [8] "_main_files/figure-html/hist_libSizeFactors-1.png"          
    +#>  [9] "_main_files/figure-html/hist_p-1.png"                       
    +#> [10] "_main_files/figure-html/lessRes_clustering-1.png"           
    +#> [11] "_main_files/figure-html/modelGeneVar_batch-1.png"           
    +#> [12] "_main_files/figure-html/modelGeneVar_zeisel-1.png"          
    +#> [13] "_main_files/figure-html/modelGeneVarByPoisson_zeisel-1.png" 
    +#> [14] "_main_files/figure-html/modelGeneVarWithSpikes_416b-1.png"  
    +#> [15] "_main_files/figure-html/PCs_zeisel-1.png"                   
    +#> [16] "_main_files/figure-html/plot_clusters_zeisel-1.png"         
    +#> [17] "_main_files/figure-html/plot_dendogram-1.png"               
    +#> [18] "_main_files/figure-html/plot_markergenes1-1.png"            
    +#> [19] "_main_files/figure-html/plot_markers_byblock-1.png"         
    +#> [20] "_main_files/figure-html/Plot_multiplePCA_PCs-1.png"         
    +#> [21] "_main_files/figure-html/plotDots_markers-1.png"             
    +#> [22] "_main_files/figure-html/predicted_vs_clusters_heatmap-1.png"
    +#> [23] "_main_files/figure-html/QC_sce416b_plots-1.png"             
    +#> [24] "_main_files/figure-html/runTSNE_zeisel-1.png"               
    +#> [25] "_main_files/figure-html/set_PBMC_dataset-1.png"             
    +#> [26] "_main_files/figure-html/set_PBMC_dataset-2.png"             
    +#> [27] "_main_files/figure-html/top_markers_heatmap-1.png"          
    +#> [28] "_main_files/figure-html/TSNE_perplexity_plots-1.png"        
    +#> [29] "_main_files/figure-html/Umap_zeisel-1.png"                  
    +#> [30] "_main_files/figure-html/unnamed-chunk-14-1.png"             
    +#> [31] "_main_files/figure-html/unnamed-chunk-15-1.png"             
    +#> [32] "_main_files/figure-html/unnamed-chunk-16-1.png"             
    +#> [33] "_main_files/figure-html/unnamed-chunk-17-1.png"             
    +#> [34] "_main_files/figure-html/unnamed-chunk-18-1.png"             
    +#> [35] "_main_files/figure-html/unnamed-chunk-19-1.png"             
    +#> [36] "_main_files/figure-html/VarExplained_PCs-1.png"             
    +#> [37] "_main_files/figure-html/volcano plot-1.png"                 
    +#> [38] "_main_files/figure-html/voom-1.png"                         
    +#> [39] "_main.Rmd"                                                  
    +#> [40] "01_SummarizedExperiment.R"                                  
    +#> [41] "01_SummarizedExperiment.Rmd"                                
    +#> [42] "02_iSEE.R"                                                  
    +#> [43] "02_iSEE.Rmd"                                                
    +#> [44] "03_recount3_intro.R"                                        
    +#> [45] "03_recount3_intro.Rmd"                                      
    +#> [46] "04_DGE_analysis_overview.R"                                 
    +#> [47] "04_DGE_analysis_overview.Rmd"                               
    +#> [48] "05_DGE_with_limma_voom.R"                                   
    +#> [49] "05_DGE_with_limma_voom.Rmd"                                 
    +#> [50] "06_ExploreModelMatrix.R"                                    
    +#>  [ reached getOption("max.print") -- omitted 68 entries ]
    +
    # list.files(here:here(), recursive = TRUE)

    14.2 Usethis

    The usethis package simplifies many common setup tasks and workflows in R. It helps streamline the process of creating new projects, setting up Git repositories, and connecting with GitHub. Mastering usethis allows you to focus more on coding and less on configuration.

    In this case, the package is already installed so we just need to load it.

    -
    ## Install the package manually
    -# install.packages("usethis")
    -
    -## Load "usethis (previously installed)
    -library("usethis")
    +
    ## Install the package manually
    +# install.packages("usethis")
    +
    +## Load "usethis (previously installed)
    +library("usethis")

    Usage:

    All use_*() functions operate on the current directory.

    -
    ## usethis::use_*()
    -usethis::use_r()
    -usethis::use_git()
    -usethis::use_readme_md()
    +
    ## usethis::use_*()
    +usethis::use_r()
    +usethis::use_git()
    +usethis::use_readme_md()

    ✔ indicates that usethis has setup everything for you. ● indicates that you’ll need to do some work yourself.

    -
    ## For example, create a README file
    -usethis::use_readme_md()
    -#> ✔ Setting active project to '/__w/cshl_rstats_genome_scale_2024/cshl_rstats_genome_scale_2024'
    -#> ✔ Writing 'README.md'
    +
    ## For example, create a README file
    +usethis::use_readme_md()
    +#> ✔ Setting active project to '/__w/cshl_rstats_genome_scale_2024/cshl_rstats_genome_scale_2024'
    +#> ✔ Writing 'README.md'

    More functions in usethis: usethis RDocumentation

    In the following exercises, we will see some uses of usethis.

    @@ -544,21 +561,21 @@

    14.3.1 PrerequisitesInstalling Git

    After installing Git, restart RStudio to allow it to annex.

    In this case, the packages are already installed so we just need to load them.

    -
    # install.packages(c("gitcreds", "gert", "gh"))
    -
    -## Load them separately
    -library("gitcreds")
    -library("gert")
    -library("gh")
    +
    # install.packages(c("gitcreds", "gert", "gh"))
    +
    +## Load them separately
    +library("gitcreds")
    +library("gert")
    +library("gh")

    14.3.2 Creating a personal access token (PAT)

    To connect our RStudio repository with GitHub, we request a token, which allows GitHub to grant permission to our computer.

    You can request the token using R (choose a meaningful name).

    -
    ## Initiate connection with GitHub
    -usethis::create_github_token() # redirects to GitHub where you'll choose a specific name for the token
    +
    ## Initiate connection with GitHub
    +usethis::create_github_token() # redirects to GitHub where you'll choose a specific name for the token

    Copy the token to enter it later with gitcreds_set()

    -
    gitcreds::gitcreds_set() # here you place the token (NOT your GitHub password!!!)
    +
    gitcreds::gitcreds_set() # here you place the token (NOT your GitHub password!!!)

    Another way to request the token is by going to GitHub Tokens, this option will provide a recommendation of the parameters to select.

    • The token expiration parameter can be changed so it does not expire (for security, GitHub does not recommend this). Otherwise, consider its validity period.

    • @@ -566,27 +583,27 @@

      14.3.2 Creating a personal access
    • You can always generate a new one (don’t forget to delete the previous token).

    The next step is to configure our GitHub user in the global .gitconfig file:

    -
    ## Configure GitHub user
    -usethis::edit_git_config() # opens the global .gitconfig file
    -
    -## Place the name and email of your GitHub account.
    -## JUST remove the "#" and respect the other spaces
    -
    -# [user]
    -#   name = N A M E
    -#   email = github_email
    +
    ## Configure GitHub user
    +usethis::edit_git_config() # opens the global .gitconfig file
    +
    +## Place the name and email of your GitHub account.
    +## JUST remove the "#" and respect the other spaces
    +
    +# [user]
    +#   name = N A M E
    +#   email = github_email

    14.3.3 Initialize Git and GitHub repository

    Now let’s initialize the repository in Git (locally on your computer) and then request to connect it with GitHub servers. Git is the software while GitHub is the web platform (based on Git) that allows collaboration.

    -
    ## Initialize the Git repository
    -usethis::use_git()
    -
    -## Connect your local Git repository with GitHub servers
    -usethis::use_github()
    +
    ## Initialize the Git repository
    +usethis::use_git()
    +
    +## Connect your local Git repository with GitHub servers
    +usethis::use_github()

    ** Done **

    Useful command to check configuration:

    -
    gh::gh_whoami()
    +
    gh::gh_whoami()

    14.3.4 Some other gert commands

    @@ -598,23 +615,23 @@

    14.3.4 Some other gert commandsgit_log()
  • git_push()
  • -
    ## Write a new file, using here::here to specify the path
    -writeLines("hello", here::here("R", "test-here.R"))
    -
    -## Another way is to use use_r
    -usethis::use_r("test-file-github.R") # adds file to the project's R directory
    -
    -## For example, we might try adding something new
    -gert::git_add("R/test-file-github.R")
    -
    -## Add commit of what was done
    -gert::git_commit("uploaded test file")
    -
    -## Gives info about the commits
    -gert::git_log()
    -
    -## Upload your changes from the local repo to GitHub
    -gert::git_push() # IMPORTANT COMMAND
    +
    ## Write a new file, using here::here to specify the path
    +writeLines("hello", here::here("R", "test-here.R"))
    +
    +## Another way is to use use_r
    +usethis::use_r("test-file-github.R") # adds file to the project's R directory
    +
    +## For example, we might try adding something new
    +gert::git_add("R/test-file-github.R")
    +
    +## Add commit of what was done
    +gert::git_commit("uploaded test file")
    +
    +## Gives info about the commits
    +gert::git_log()
    +
    +## Upload your changes from the local repo to GitHub
    +gert::git_push() # IMPORTANT COMMAND

    It might be more user-friendly to use the Git pane that appears in RStudio :)

    @@ -647,7 +664,7 @@

    14.4.2 2. Create index.Rmd for th
    ---
     title: "Welcome to My Website"
     author: "Your Name"
    -date: "2024-06-10"
    +date: "2024-06-11"
     output: html_document
     ---
     
    @@ -671,7 +688,7 @@ 

    14.4.2 2. Create index.Rmd for th

    14.4.3 3. Render the Site

    To render the site, use the rmarkdown::render_site() function, which converts all R Markdown and Markdown files into HTML. The resulting HTML files and resources are placed in a directory, typically _site. RStudio facilitates this process with tools like the “Knit” button for individual pages and the “Build” pane for the entire site.

    Common elements, such as shared HTML files and CSS for styling, ensure consistency and avoid redundancy. A well-configured navigation bar enhances user experience by providing easy access to different sections.

    -
    rmarkdown::render_site()
    +
    rmarkdown::render_site()

    14.4.4 4. Publish the Website

    @@ -720,11 +737,11 @@

    14.5 postcards

    14.5.1 Installation

    In this case, the package is already installed.

    -
    ## You can install Postcards with the following command:
    -# install.packages("postcards")
    -
    -## Or you can install the latest development version (not recommended):
    -# remotes::install_github("seankross/postcards@main")
    +
    ## You can install Postcards with the following command:
    +# install.packages("postcards")
    +
    +## Or you can install the latest development version (not recommended):
    +# remotes::install_github("seankross/postcards@main")

    14.5.2 Templates

    @@ -774,24 +791,24 @@

    14.6.1 Create a New Project in RS
  • An R Markdown document with your site’s content
  • A sample photo you should replace (with your own)
  • -
    ## Create a new project
    -usethis::create_project("Your_Username.github.io")
    +
    ## Create a new project
    +usethis::create_project("Your_Username.github.io")

    14.6.2 Set Up Git and GitHub

    To save changes, you need to set up Git and GitHub

    -
    ## Set up Git and GitHub
    -usethis::use_git() # Restart the session
    -usethis::use_github()
    +
    ## Set up Git and GitHub
    +usethis::use_git() # Restart the session
    +usethis::use_github()

    14.6.3 Choose a Template

    -
    ## Choose only one template (the one you like the most)
    -postcards::create_postcard(template = "jolla")
    -postcards::create_postcard(template = "jolla-blue")
    -postcards::create_postcard(template = "trestles")
    -postcards::create_postcard(template = "onofre")
    -postcards::create_postcard(template = "solana")
    +
    ## Choose only one template (the one you like the most)
    +postcards::create_postcard(template = "jolla")
    +postcards::create_postcard(template = "jolla-blue")
    +postcards::create_postcard(template = "trestles")
    +postcards::create_postcard(template = "onofre")
    +postcards::create_postcard(template = "solana")

    In this way, you will also get the 2 important files:

    • An R Markdown document with your site’s content
    • @@ -809,13 +826,13 @@

      14.6.5 Deploy the Page
      ## Deploy the GitHub page
      -rmarkdown::render("index.Rmd")

    +
    ## Deploy the GitHub page
    +rmarkdown::render("index.Rmd")

    ** Done **

    -
    -

    14.7 References

    +
    +

    14.7 References

    -
  • 11.9 Marker gene detection
  • -
  • 11.10 Cell type annotation
  • +
  • 11.9 Marker gene detection +
  • +
  • 11.10 Cell type annotation +
  • +
  • 11.11 Getting ready again +
  • +
  • 11.12 References
  • 12 Introduction to spatial transcriptomics
  • -
  • 14.7 References
  • +
  • 14.7 References
  • Final R Session
  • @@ -397,24 +414,24 @@

    13 Re-use of bulk RNA-seq methods

    13.1 Spatial registration

    In 2023, Louise A. Huuki-Myers contributed a new vignette to spatialLIBD as noted on the package news / changelog: http://research.libd.org/spatialLIBD/news/index.html#spatiallibd-1132.

    You should be able to run without any issues the code Louise explained at http://research.libd.org/spatialLIBD/articles/guide_to_spatial_registration.html. This same information is displayed at https://bioconductor.org/packages/release/data/experiment/vignettes/spatialLIBD/inst/doc/guide_to_spatial_registration.html.

    -
    ## get reference layer enrichment statistics
    -layer_modeling_results <- spatialLIBD::fetch_data(type = "modeling_results")
    -#> adding rname 'https://www.dropbox.com/s/se6rrgb9yhm5gfh/Human_DLPFC_Visium_modeling_results.Rdata?dl=1'
    -#> 2024-06-10 23:30:27.833595 loading file /github/home/.cache/R/BiocFileCache/399798f9392_Human_DLPFC_Visium_modeling_results.Rdata%3Fdl%3D1
    +
    ## get reference layer enrichment statistics
    +layer_modeling_results <- spatialLIBD::fetch_data(type = "modeling_results")
    +#> adding rname 'https://www.dropbox.com/s/se6rrgb9yhm5gfh/Human_DLPFC_Visium_modeling_results.Rdata?dl=1'
    +#> 2024-06-11 11:00:48.91264 loading file /github/home/.cache/R/BiocFileCache/47672ee9738_Human_DLPFC_Visium_modeling_results.Rdata%3Fdl%3D1

    If the above doesn’t work, related to the curl issue we previously discussed, then use this workaround:

    -
    tmp_modeling_results <- tempfile("modeling_results.RData")
    -download.file(
    -    "https://www.dropbox.com/s/se6rrgb9yhm5gfh/Human_DLPFC_Visium_modeling_results.Rdata?dl=1",
    -    tmp_modeling_results,
    -    mode = "wb"
    -)
    -load(tmp_modeling_results, verbose = TRUE)
    -#> Loading objects:
    -#>   modeling_results
    -
    
    -## Let's rename the object into the name used in the
    -## spatial registration vignette (from spatialLIBD)
    -layer_modeling_results <- modeling_results
    +
    tmp_modeling_results <- tempfile("modeling_results.RData")
    +download.file(
    +    "https://www.dropbox.com/s/se6rrgb9yhm5gfh/Human_DLPFC_Visium_modeling_results.Rdata?dl=1",
    +    tmp_modeling_results,
    +    mode = "wb"
    +)
    +load(tmp_modeling_results, verbose = TRUE)
    +#> Loading objects:
    +#>   modeling_results
    +
    
    +## Let's rename the object into the name used in the
    +## spatial registration vignette (from spatialLIBD)
    +layer_modeling_results <- modeling_results

    This journal club style video of the main results of the spatialDLPFC paper does explain the basics of spatial registration: