Skip to content

Commit

Permalink
Update R/SEraster.R
Browse files Browse the repository at this point in the history
Co-authored-by: David Collins <[email protected]>
  • Loading branch information
zskylarli and dcollins15 authored Jun 12, 2024
1 parent 45c5903 commit 3591c3c
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions R/SEraster.R
Original file line number Diff line number Diff line change
Expand Up @@ -488,33 +488,6 @@ RunPermutateByRotation <- function(input, n_perm = 1, verbose = FALSE) {
}
}

#' @keyword internal
#'
updateVisiumV2 <- function(input, pos_rotated, assay_name, angle, image_name) {
pos_new <- pos_rotated[, c("x_rotated", "y_rotated")]
input_fov <- input[[image_name]]

fov <- CreateFOV(
pos_new[, c("x_rotated", "y_rotated")],
type = "centroids",
radius = input_fov@scale.factors[["spot"]],
assay = assay_name,
theta = angle,
key = paste0("rotated", angle, "_")
)
visium.fov <- new(
Class = "VisiumV2",
boundaries = fov@boundaries,
molecules = fov@molecules,
assay = fov@assay,
key = fov@key,
image = rotate(input_fov@image, angle, pos_new),
scale.factors = input_fov@scale.factors
)
input[[image_name]] <- NULL
input@images[[paste0("rotated", angle)]] <- visium.fov
return(input)
}

#' @keyword internal
#'
Expand Down

0 comments on commit 3591c3c

Please sign in to comment.