Skip to content

Commit

Permalink
disable missing values in the input.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyupeng committed Sep 2, 2024
1 parent 65d8f5f commit 8f0be1b
Show file tree
Hide file tree
Showing 29 changed files with 226 additions and 140 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: SpaTopic
Type: Package
Title: Topic Inference to Identify Tissue Architecture in Multiplexed Images
Version: 1.1.0.9000
Version: 1.1.0.9900
Date: 2024-04-22
Authors@R: person("Xiyu", "Peng", email = "[email protected]",
role = c("aut", "cre"),comment = c(ORCID = "0000-0003-4232-0910"))
Expand All @@ -23,7 +23,7 @@ Suggests:
SeuratObject (>= 4.9.9.9086),
doParallel (>= 1.0),
VignetteBuilder: knitr
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Encoding: UTF-8
LazyData: true
URL: https://github.com/xiyupeng/SpaTopic
Expand Down
8 changes: 8 additions & 0 deletions R/Gibbs_sampler.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ SpaTopic_inference<-function(tissue, ntopics, sigma = 50, region_radius = 400, k
return(NULL)
}

if(any(is.na(itr_df$image)) |
any(is.na(itr_df$X)) |
any(is.na(itr_df$Y)) |
any(is.na(itr_df$type)) ){
stop("Please make sure you have no NA in your input dataset!")
return(NULL)
}

itr_df$X<-as.numeric(itr_df$X)
itr_df$Y<-as.numeric(itr_df$Y)
itr_df$type<-as.factor(itr_df$type)
Expand Down
4 changes: 1 addition & 3 deletions R/SpaTopic-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
#'
#' @author Xiyu Peng \email{[email protected]}
#'
#' @docType package
#'
#' @keywords package
#'
#' @importFrom Rcpp sourceCpp
#'
#' @useDynLib SpaTopic
NA
"_PACKAGE"

8 changes: 4 additions & 4 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8f0be1b

Please sign in to comment.