Skip to content

Commit

Permalink
fix: find_dampening_constant() needs drop = FALSE
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajic committed Jun 3, 2024
1 parent 2a74ed0 commit 0d94fc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Giotto 4.0.10 TBD

## Bug fixes
* Fix error in `plotInteractivePolygons()` when providing a spatial plot with a continuous scale
* Fix error in `plotInteractivePolygons()` when providing a spatial plot with a continuous scale [#964](https://github.com/drieslab/Giotto/issues/964) by jweis3
* Fix error in DWLS `find_dampening_constant()` when `S[subset, ]` produces only 1 gene.

# Giotto 4.0.9

Expand Down
2 changes: 1 addition & 1 deletion R/spatial_enrichment.R
Original file line number Diff line number Diff line change
Expand Up @@ -2911,7 +2911,7 @@ find_dampening_constant <- function(

# solve dampened weighted least squares for subset
fit <- stats::lm(
B[subset] ~ -1 + S[subset, ],
B[subset] ~ -1 + S[subset, , drop = FALSE],
weights = wsDampened[subset]
)
sol <- fit$coef * sum(goldStandard) / sum(fit$coef)
Expand Down

0 comments on commit 0d94fc8

Please sign in to comment.