Skip to content

Commit

Permalink
Change default model to poisson model for raw count data (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyiguo1 committed Dec 29, 2023
1 parent 8f2772e commit 153c7c3
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions R/tpSVG.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,22 @@
#' spe,
#' family = poisson,
#' assay_name = "counts",
#' offset = log(spe$total) # Natural log library size
#' offset = log(spe$sizeFactor) # Natural log library size
#' )

tpSVG <- function(input, spatial_coords = NULL, X = NULL,
family = gaussian(),
offset = NULL, weights = NULL,
assay_name = "logcounts",
n_threads = 1, BPPARAM = NULL,
verbose = FALSE, ...) {
tpSVG <- function(
input,
spatial_coords = NULL,
X = NULL,
family = poisson(),
offset = log(input$sizeFactor),
weights = NULL,
assay_name = "counts",
n_threads = 1,
BPPARAM = NULL,
verbose = FALSE,
...
) {


# NOTE: Some code blocks are borrowed from nnSVG by Lukas M Weber.
Expand Down

0 comments on commit 153c7c3

Please sign in to comment.