From fe2c54183b606fbfa04893a048871316ecfa539e Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Wed, 6 Nov 2024 14:38:43 -0500 Subject: [PATCH 1/9] Update Dockerfile to 3.20 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 97c8357..b17043a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM bioconductor/bioconductor_docker:devel +FROM bioconductor/bioconductor_docker:3.20 WORKDIR /home/rstudio From c822eb7cddd00c2959cde8428dd9008268fac711 Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Wed, 6 Nov 2024 16:38:58 -0500 Subject: [PATCH 2/9] Try 3.19 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b17043a..e2b6423 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM bioconductor/bioconductor_docker:3.20 +FROM bioconductor/bioconductor_docker:3.19 WORKDIR /home/rstudio From b40f0d15db0f82fdbe8e50102ed6e5c3296ccf7a Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Wed, 6 Nov 2024 16:54:47 -0500 Subject: [PATCH 3/9] Update DESCRIPTION --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index d070f25..339a3a1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,4 +1,4 @@ -Package:BioCAsia_2024_wSIR +Package: BioCAsia_2024_wSIR Title: wSIR: Weighted Sliced Inverse Regression for supervised dimension reduction of spatial transcriptomics and single cell gene expression data Version: 2.0.1 Authors@R: c( From e26c7c6921355375de338ad41f95cb96162effbe Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Wed, 6 Nov 2024 17:08:08 -0500 Subject: [PATCH 4/9] Fix name --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 339a3a1..8646b1e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,4 +1,4 @@ -Package: BioCAsia_2024_wSIR +Package: BioCAsia2024wSIR Title: wSIR: Weighted Sliced Inverse Regression for supervised dimension reduction of spatial transcriptomics and single cell gene expression data Version: 2.0.1 Authors@R: c( From b04183041ba0867a0ee8aad4ff564b53f4887afc Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Wed, 6 Nov 2024 17:08:26 -0500 Subject: [PATCH 5/9] Try 3.20 again --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e2b6423..b17043a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM bioconductor/bioconductor_docker:3.19 +FROM bioconductor/bioconductor_docker:3.20 WORKDIR /home/rstudio From 5bb919c8802bf44568c4872c43d9bd52c88b6cc9 Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Wed, 6 Nov 2024 17:21:33 -0500 Subject: [PATCH 6/9] Use name from vignette --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8646b1e..58abdf4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,4 +1,4 @@ -Package: BioCAsia2024wSIR +Package: wSIRBioCAsia2024 Title: wSIR: Weighted Sliced Inverse Regression for supervised dimension reduction of spatial transcriptomics and single cell gene expression data Version: 2.0.1 Authors@R: c( From aa0c6ccf1586cda257bb537912a622e897d6df1e Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Wed, 6 Nov 2024 18:20:27 -0500 Subject: [PATCH 7/9] Back to 3.19 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b17043a..e2b6423 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM bioconductor/bioconductor_docker:3.20 +FROM bioconductor/bioconductor_docker:3.19 WORKDIR /home/rstudio From 27407808c0cf6b509562e5d9e10ae511676dd20d Mon Sep 17 00:00:00 2001 From: Vince Carey Date: Wed, 6 Nov 2024 18:28:49 -0500 Subject: [PATCH 8/9] Update DESCRIPTION you cannot have underscores in package name. --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 58abdf4..0e8ce54 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,4 +1,4 @@ -Package: wSIRBioCAsia2024 +Package:BioCAsia2024wSIR Title: wSIR: Weighted Sliced Inverse Regression for supervised dimension reduction of spatial transcriptomics and single cell gene expression data Version: 2.0.1 Authors@R: c( From 1390682659e4fad0264591d9c988ffb37137dfa4 Mon Sep 17 00:00:00 2001 From: Vince Carey Date: Wed, 6 Nov 2024 18:33:32 -0500 Subject: [PATCH 9/9] Update wSIR_workshop.Rmd There are various problems. As set up now, data() will fail. The package name must be consistent and have no underscores. Some code does not seem to run in my tests. --- vignettes/wSIR_workshop.Rmd | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vignettes/wSIR_workshop.Rmd b/vignettes/wSIR_workshop.Rmd index 936fb3a..e62a664 100644 --- a/vignettes/wSIR_workshop.Rmd +++ b/vignettes/wSIR_workshop.Rmd @@ -90,19 +90,21 @@ The expected timing of the workshop: ### Load packages ```{r} -library(wSIRBioCAsia2024) +library(BioCAsia2024wSIR) # use the same name, no underscores, as in DESCRIPTION library(ggplot2) library(vctrs) library(wSIR) library(magrittr) +library(dplyr) # for arrange ``` -### Download data +### Acquire data We will use spatial transcriptomics data for mouse embryos from https://www.nature.com/articles/s41587-021-01006-2 . We will examine how we can apply the wSIR functions to study this data. This dataset will illustrate how you can apply the package functions to your own data. ```{r} -data(embryos_data_red) +#data(embryos_data_red) # you don't have a data folder +load(system.file("extdata", "embryos_data_red.RData", package="BioCAsia2024wSIR")) ## files this downloads: # exprs1 @@ -289,7 +291,7 @@ We recommend you don't adjust `nrep` or `varThreshold`, as this can make it take ```{r} subsetted = 0.2 # Change this to specify the proportion of the data you want to use for this exploration rsample <- sample(c(TRUE, FALSE), size = n3, replace = TRUE, prob = c(subsetted, 1-subsetted)) - +# FIXME EWP_object <- exploreWSIRParams(exprs = exprs3[rsample,], coords = coords3[rsample,], nrep = 3, # This function computes a random train/test split of the data nrep times @@ -447,7 +449,8 @@ Note that for this workshop, we will not actually compute the Tangram predicted Below loads in 7 matrices, all of dimension n1 by 2, containing the predicted coordinates using as inputs: PCA, PLS, SIR, wSIR, LDA, counts and logcounts. The file names are of the form `pred_pca_em1`, in that case for the predicted coordinates of embryo 1 using the PCA low-dimensional embedding as the Tangram input. We also include the predicted coordinates using just counts or LogCounts as the inputs (without any dimension reduction applied) as those are the default inputs for Tangram. ```{r} -data(em1_tangram_preds_red) # This loads a list (not vector) of predicted coordinates into your environment, named pred_em1_tangram_red +#data(em1_tangram_preds_red) # This loads a list (not vector) of predicted coordinates into your environment, named pred_em1_tangram_red +load(system.file("extdata", "em1_tangram_preds_red.RData", package="BioCAsia2024wSIR")) ``` To evaluate, we will compute the distance correlation between the predicted and the actual coordinates, for the predicted coordinates from all dimension reduction methods. This is not part of the wSIR package, but should demonstrate the effectiveness of using wSIR as a dimension reduction tool to improve downstream analysis.