Skip to content

Commit

Permalink
Avoid initializing spatialCoords with rownames
Browse files Browse the repository at this point in the history
  • Loading branch information
nilseling committed Oct 19, 2023
1 parent d347b58 commit 2dd30b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: imcRtools
Version: 1.7.7
Version: 1.7.8
Title: Methods for imaging mass cytometry data analysis
Description:
This R package supports the handling and analysis of imaging mass cytometry
Expand Down
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,7 @@ Changes in version 1.7.7 (2023-10-02)

+ Bug fix: in rare cases the testInteractions p-values were not correctly computed due to machine precision issues

Changes in version 1.7.8 (2023-10-19)

+ spatialCoords are not initialised with rownames anymore

4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
spatialCoords(y) <- matrix(c(cur_props[[coords[1]]],
cur_props[[coords[2]]]),
ncol = 2, byrow = FALSE,
dimnames = list(as.character(y$ObjectNumber),
dimnames = list(NULL,
c("Pos_X", "Pos_Y")))
colData(y) <- cbind(colData(y),
cur_props[,!colnames(cur_props) %in%
Expand Down Expand Up @@ -257,7 +257,7 @@
cur_counts[[extract_coords_from[1]]],
cur_counts[[extract_coords_from[2]]]),
ncol = 2, byrow = FALSE,
dimnames = list(as.character(object$ObjectNumber),
dimnames = list(NULL,
c("Pos_X", "Pos_Y")))
}

Expand Down

0 comments on commit 2dd30b4

Please sign in to comment.