diff --git a/DESCRIPTION b/DESCRIPTION index 11403ea..7c9ccf7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,7 @@ LinkingTo: Rcpp, Suggests: knitr, rmarkdown, - SeuratObject (>=4.9.9.9086), + SeuratObject (>= 4.9.9.9086), doParallel (>= 1.0), VignetteBuilder: knitr RoxygenNote: 7.2.3 diff --git a/NEWS.md b/NEWS.md index 1e66adc..61fe9b3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # SpaTopic 1.0 +* Initial submission to CRAN + # SpaTopic 0.99 * The Version under development diff --git a/R/image_data.R b/R/image_data.R index 2aa06f6..d053280 100644 --- a/R/image_data.R +++ b/R/image_data.R @@ -5,10 +5,10 @@ #' @format ## `lung5` #' A data frame with 100149 rows and 4 columns: #' \describe{ -#' \item{image} Image ID -#' \item{X} X coordinate of the cell -#' \item{Y} Y coordinate of the cell -#' \item{type} cell type +#' \item{image}{Image ID} +#' \item{X}{X coordinate of the cell} +#' \item{Y}{Y coordinate of the cell} +#' \item{type}{cell type} #' } #' @source #' @seealso \code{\link{SpaTopic_inference}},\code{\link{Seurat5obj_to_SpaTopic}} diff --git a/docs/404.html b/docs/404.html index f4cf7e1..333fbfc 100644 --- a/docs/404.html +++ b/docs/404.html @@ -24,7 +24,7 @@ SpaTopic - 0.99 + 1.0 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index d902337..4a44d06 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -10,7 +10,7 @@ SpaTopic - 0.99 + 1.0 diff --git a/docs/articles/Intro_SpaTopic.html b/docs/articles/Intro_SpaTopic.html index 690f1ae..3fd6d18 100644 --- a/docs/articles/Intro_SpaTopic.html +++ b/docs/articles/Intro_SpaTopic.html @@ -26,7 +26,7 @@ SpaTopic - 0.99 + 1.0 @@ -104,7 +104,7 @@ Simple Usage -library(SpaTopic) +library(SpaTopic) ## The input can be a data frame or a list of data frames data("lung5") head(lung5) @@ -123,6 +123,7 @@ Simple Usage#> #> image1 #> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> [1] "Min perplexity during initialization:" @@ -131,6 +132,7 @@ Simple Usage#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563 Check the output of SpaTopic diff --git a/docs/articles/Model_Selection.html b/docs/articles/Model_Selection.html index 80dfdd4..da76c9d 100644 --- a/docs/articles/Model_Selection.html +++ b/docs/articles/Model_Selection.html @@ -26,7 +26,7 @@ SpaTopic - 0.99 + 1.0 @@ -91,7 +91,7 @@ 2023-12-20 Simple Usage -library(SpaTopic) +library(SpaTopic) Number of Topics diff --git a/docs/articles/SpaTopic.html b/docs/articles/SpaTopic.html index 63bf576..a3aa9f5 100644 --- a/docs/articles/SpaTopic.html +++ b/docs/articles/SpaTopic.html @@ -26,7 +26,7 @@ SpaTopic - 0.99 + 1.0 @@ -98,7 +98,8 @@ Set-up We use a non-small cell lung cancer image to illustrate how to use SpaTopic. The data object here can be download from here, with original public resources available on the nanostring website. These images were generated using a 960-plex CoxMx RNA panel on the Nanostring CoxMx Spatial Molecular Imager platform. We selected Lung5-1 sample and annotated cells using Azimuth based on the human lung reference v1.0. The Lung5-1 sample contains 38 annotated cell types. Since we used healthy lung tissue as the reference, tumor cells were labeled as ’basal’ cells. More informaion can be found here. -## We use Seurat v5 package to visualze the results +## We use Seurat v5 package to visualize the results. +## If you still use Seurat v4, you will have the error library(Seurat, quietly = TRUE);packageVersion("Seurat") #> [1] '4.9.9.9050' ## Load the Seurat object for the image @@ -122,7 +123,7 @@ Input The required input of SpaTopic is a data frame containing cells within on a single image or a list of data frames for multiple images. Each data frame consists of four columns: The image ID, X, Y cell coordinates, and cell type. You may use the function Seurat5obj_to_SpaTopic() to extract input data from a typical Seurat v5 object. The column name for cell type information need to be provided via option group.by. -library(SpaTopic);packageVersion("SpaTopic") +library(SpaTopic);packageVersion("SpaTopic") #> [1] '0.99' ## Prepare input from Seurat Object dataset<-Seurat5obj_to_SpaTopic(object = nano.obj, group.by = "predicted.annotation.l1",image = "image1") @@ -145,8 +146,8 @@ Gibbs Sampling#> [1] "number of cells per image:" #> #> image1 -#> 100149 -#> Start initialization.... +#> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> Warning: package 'RANN' was built under R version 4.1.3 @@ -157,11 +158,11 @@ Gibbs Sampling#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 -#> Finish initialization. Start Gibbs sampling.... +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563 #> user system elapsed -#> 110.41 0.42 117.79 +#> 85.02 0.30 85.51 Topic Content and Distribution diff --git a/docs/articles/index.html b/docs/articles/index.html index 80ccaad..09443df 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -10,7 +10,7 @@ SpaTopic - 0.99 + 1.0 diff --git a/docs/authors.html b/docs/authors.html index 33d3ea4..1c7d446 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -10,7 +10,7 @@ SpaTopic - 0.99 + 1.0 @@ -68,13 +68,13 @@ Citation Peng X (2023). SpaTopic: Topic Inference to Identify Tissue Architecture in Multiplexed Images. -R package version 0.99, https://github.com/xiyupeng/SpaTopic. +R package version 1.0, https://github.com/xiyupeng/SpaTopic. @Manual{, title = {SpaTopic: Topic Inference to Identify Tissue Architecture in Multiplexed Images}, author = {Xiyu Peng}, year = {2023}, - note = {R package version 0.99}, + note = {R package version 1.0}, url = {https://github.com/xiyupeng/SpaTopic}, } diff --git a/docs/index.html b/docs/index.html index cbdd579..8d0d6dc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ SpaTopic - 0.99 + 1.0 @@ -117,7 +117,7 @@ Usage The required input of SpaTopic is a data frame containing cells within on a single image or a list of data frames for multiple images. Each data frame consists of four columns: The image ID, X, Y cell coordinates, and cell type information. -library(SpaTopic) +library(SpaTopic) ## The input can be a data frame or a list of data frames data("lung5") head(lung5) diff --git a/docs/news/index.html b/docs/news/index.html index a910bdd..84d7de4 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -10,7 +10,7 @@ SpaTopic - 0.99 + 1.0 @@ -54,10 +54,14 @@ Source: NEWS.md + +SpaTopic 1.0 +Initial submission to CRAN SpaTopic 0.99 The Version under development - +
-library(SpaTopic) +library(SpaTopic) ## The input can be a data frame or a list of data frames data("lung5") head(lung5) @@ -123,6 +123,7 @@ Simple Usage#> #> image1 #> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> [1] "Min perplexity during initialization:" @@ -131,6 +132,7 @@ Simple Usage#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563
library(SpaTopic) +library(SpaTopic) ## The input can be a data frame or a list of data frames data("lung5") head(lung5) @@ -123,6 +123,7 @@ Simple Usage#> #> image1 #> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> [1] "Min perplexity during initialization:" @@ -131,6 +132,7 @@ Simple Usage#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563
library(SpaTopic) ## The input can be a data frame or a list of data frames data("lung5") head(lung5) @@ -123,6 +123,7 @@ Simple Usage#> #> image1 #> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> [1] "Min perplexity during initialization:" @@ -131,6 +132,7 @@ Simple Usage#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563
Check the output of SpaTopic
-library(SpaTopic)
library(SpaTopic)
We use a non-small cell lung cancer image to illustrate how to use SpaTopic. The data object here can be download from here, with original public resources available on the nanostring website. These images were generated using a 960-plex CoxMx RNA panel on the Nanostring CoxMx Spatial Molecular Imager platform. We selected Lung5-1 sample and annotated cells using Azimuth based on the human lung reference v1.0. The Lung5-1 sample contains 38 annotated cell types. Since we used healthy lung tissue as the reference, tumor cells were labeled as ’basal’ cells. More informaion can be found here.
SpaTopic
-## We use Seurat v5 package to visualze the results +## We use Seurat v5 package to visualize the results. +## If you still use Seurat v4, you will have the error library(Seurat, quietly = TRUE);packageVersion("Seurat") #> [1] '4.9.9.9050' ## Load the Seurat object for the image @@ -122,7 +123,7 @@ Input The required input of SpaTopic is a data frame containing cells within on a single image or a list of data frames for multiple images. Each data frame consists of four columns: The image ID, X, Y cell coordinates, and cell type. You may use the function Seurat5obj_to_SpaTopic() to extract input data from a typical Seurat v5 object. The column name for cell type information need to be provided via option group.by. -library(SpaTopic);packageVersion("SpaTopic") +library(SpaTopic);packageVersion("SpaTopic") #> [1] '0.99' ## Prepare input from Seurat Object dataset<-Seurat5obj_to_SpaTopic(object = nano.obj, group.by = "predicted.annotation.l1",image = "image1") @@ -145,8 +146,8 @@ Gibbs Sampling#> [1] "number of cells per image:" #> #> image1 -#> 100149 -#> Start initialization.... +#> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> Warning: package 'RANN' was built under R version 4.1.3 @@ -157,11 +158,11 @@ Gibbs Sampling#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 -#> Finish initialization. Start Gibbs sampling.... +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563 #> user system elapsed -#> 110.41 0.42 117.79 +#> 85.02 0.30 85.51
## We use Seurat v5 package to visualze the results +## We use Seurat v5 package to visualize the results. +## If you still use Seurat v4, you will have the error library(Seurat, quietly = TRUE);packageVersion("Seurat") #> [1] '4.9.9.9050' ## Load the Seurat object for the image @@ -122,7 +123,7 @@ Input The required input of SpaTopic is a data frame containing cells within on a single image or a list of data frames for multiple images. Each data frame consists of four columns: The image ID, X, Y cell coordinates, and cell type. You may use the function Seurat5obj_to_SpaTopic() to extract input data from a typical Seurat v5 object. The column name for cell type information need to be provided via option group.by. -library(SpaTopic);packageVersion("SpaTopic") +library(SpaTopic);packageVersion("SpaTopic") #> [1] '0.99' ## Prepare input from Seurat Object dataset<-Seurat5obj_to_SpaTopic(object = nano.obj, group.by = "predicted.annotation.l1",image = "image1") @@ -145,8 +146,8 @@ Gibbs Sampling#> [1] "number of cells per image:" #> #> image1 -#> 100149 -#> Start initialization.... +#> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> Warning: package 'RANN' was built under R version 4.1.3 @@ -157,11 +158,11 @@ Gibbs Sampling#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 -#> Finish initialization. Start Gibbs sampling.... +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563 #> user system elapsed -#> 110.41 0.42 117.79 +#> 85.02 0.30 85.51
## We use Seurat v5 package to visualize the results. +## If you still use Seurat v4, you will have the error library(Seurat, quietly = TRUE);packageVersion("Seurat") #> [1] '4.9.9.9050' ## Load the Seurat object for the image @@ -122,7 +123,7 @@ Input The required input of SpaTopic is a data frame containing cells within on a single image or a list of data frames for multiple images. Each data frame consists of four columns: The image ID, X, Y cell coordinates, and cell type. You may use the function Seurat5obj_to_SpaTopic() to extract input data from a typical Seurat v5 object. The column name for cell type information need to be provided via option group.by. -library(SpaTopic);packageVersion("SpaTopic") +library(SpaTopic);packageVersion("SpaTopic") #> [1] '0.99' ## Prepare input from Seurat Object dataset<-Seurat5obj_to_SpaTopic(object = nano.obj, group.by = "predicted.annotation.l1",image = "image1") @@ -145,8 +146,8 @@ Gibbs Sampling#> [1] "number of cells per image:" #> #> image1 -#> 100149 -#> Start initialization.... +#> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> Warning: package 'RANN' was built under R version 4.1.3 @@ -157,11 +158,11 @@ Gibbs Sampling#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 -#> Finish initialization. Start Gibbs sampling.... +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563 #> user system elapsed -#> 110.41 0.42 117.79 +#> 85.02 0.30 85.51
The required input of SpaTopic is a data frame containing cells within on a single image or a list of data frames for multiple images. Each data frame consists of four columns: The image ID, X, Y cell coordinates, and cell type.
You may use the function Seurat5obj_to_SpaTopic() to extract input data from a typical Seurat v5 object. The column name for cell type information need to be provided via option group.by.
Seurat5obj_to_SpaTopic()
group.by
-library(SpaTopic);packageVersion("SpaTopic") +library(SpaTopic);packageVersion("SpaTopic") #> [1] '0.99' ## Prepare input from Seurat Object dataset<-Seurat5obj_to_SpaTopic(object = nano.obj, group.by = "predicted.annotation.l1",image = "image1") @@ -145,8 +146,8 @@ Gibbs Sampling#> [1] "number of cells per image:" #> #> image1 -#> 100149 -#> Start initialization.... +#> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> Warning: package 'RANN' was built under R version 4.1.3 @@ -157,11 +158,11 @@ Gibbs Sampling#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 -#> Finish initialization. Start Gibbs sampling.... +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563 #> user system elapsed -#> 110.41 0.42 117.79
library(SpaTopic);packageVersion("SpaTopic") +library(SpaTopic);packageVersion("SpaTopic") #> [1] '0.99' ## Prepare input from Seurat Object dataset<-Seurat5obj_to_SpaTopic(object = nano.obj, group.by = "predicted.annotation.l1",image = "image1") @@ -145,8 +146,8 @@ Gibbs Sampling#> [1] "number of cells per image:" #> #> image1 -#> 100149 -#> Start initialization.... +#> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> Warning: package 'RANN' was built under R version 4.1.3 @@ -157,11 +158,11 @@ Gibbs Sampling#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 -#> Finish initialization. Start Gibbs sampling.... +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563 #> user system elapsed -#> 110.41 0.42 117.79
library(SpaTopic);packageVersion("SpaTopic") #> [1] '0.99' ## Prepare input from Seurat Object dataset<-Seurat5obj_to_SpaTopic(object = nano.obj, group.by = "predicted.annotation.l1",image = "image1") @@ -145,8 +146,8 @@ Gibbs Sampling#> [1] "number of cells per image:" #> #> image1 -#> 100149 -#> Start initialization.... +#> 100149 +#> [1] "Initialization...." #> [1] "Numer of Initializations:" #> [1] 10 #> Warning: package 'RANN' was built under R version 4.1.3 @@ -157,11 +158,11 @@ Gibbs Sampling#> [1] 971 #> [1] "number of cells per region on average:" #> [1] 103.1401 -#> Finish initialization. Start Gibbs sampling.... +#> [1] "Finish initialization. Start Gibbs sampling...." #> [1] "Output model perplexity.." #> [1] 11.31563 #> user system elapsed -#> 110.41 0.42 117.79
Peng X (2023). SpaTopic: Topic Inference to Identify Tissue Architecture in Multiplexed Images. -R package version 0.99, https://github.com/xiyupeng/SpaTopic. +R package version 1.0, https://github.com/xiyupeng/SpaTopic.
@Manual{, title = {SpaTopic: Topic Inference to Identify Tissue Architecture in Multiplexed Images}, author = {Xiyu Peng}, year = {2023}, - note = {R package version 0.99}, + note = {R package version 1.0}, url = {https://github.com/xiyupeng/SpaTopic}, }
The required input of SpaTopic is a data frame containing cells within on a single image or a list of data frames for multiple images. Each data frame consists of four columns: The image ID, X, Y cell coordinates, and cell type information.
-library(SpaTopic) +library(SpaTopic) ## The input can be a data frame or a list of data frames data("lung5") head(lung5) diff --git a/docs/news/index.html b/docs/news/index.html index a910bdd..84d7de4 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -10,7 +10,7 @@ SpaTopic - 0.99 + 1.0 @@ -54,10 +54,14 @@ Source: NEWS.md
library(SpaTopic) +library(SpaTopic) ## The input can be a data frame or a list of data frames data("lung5") head(lung5) diff --git a/docs/news/index.html b/docs/news/index.html index a910bdd..84d7de4 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -10,7 +10,7 @@ SpaTopic - 0.99 + 1.0 @@ -54,10 +54,14 @@ Source: NEWS.md
library(SpaTopic) ## The input can be a data frame or a list of data frames data("lung5") head(lung5) diff --git a/docs/news/index.html b/docs/news/index.html index a910bdd..84d7de4 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -10,7 +10,7 @@ SpaTopic - 0.99 + 1.0 @@ -54,10 +54,14 @@ Source: NEWS.md
NEWS.md