Skip to content

Commit

Permalink
Merge branch 'dev' into dev2
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajic committed Aug 30, 2024
2 parents 180f48b + 1e5d90e commit 5dde81f
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 3 deletions.
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@

# GiottoClass 0.3.6 (2024/08/30)

## bug fixes
- fix `dimnames()` for some subobjects

## enhancements
- python packages to install through pip is now settable in `installGiottoEnvironment()`

# GiottoClass 0.3.5 (2024/08/28)

## breaking changes
Expand Down
1 change: 0 additions & 1 deletion R/join.R
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ joinGiottoObjects <- function(gobject_list,




## spatial locations
vmsg(.v = verbose, "3. spatial locations")

Expand Down
28 changes: 27 additions & 1 deletion R/methods-names.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#' @include generics.R
NULL

# NOTE:
# dimnames MUST be provided for rownames and colnames methods to be well
# behaved

#' @title Row and column names
#' @name row-plus-colnames-generic
#' @aliases colnames rownames
#' @description Retrieve or set the row or column names of an object
#' @param x object
#' @return A character vector of row or col names
#' @keywords internal
#' @examples
#' g <- GiottoData::loadSubObjectMini("exprObj")
#'
Expand All @@ -19,6 +24,7 @@ NULL
#' Retrieve or set the dimnames of an object
#' @param x object
#' @returns character
#' @keywords internal
#' @examples
#' g <- GiottoData::loadSubObjectMini("exprObj")
#'
Expand Down Expand Up @@ -60,7 +66,9 @@ setMethod("rownames", signature(x = "exprObj"), function(x) rownames(x[]))
#' @export
setMethod("rownames", signature(x = "dimObj"), function(x) rownames(x[]))


#' @rdname row-plus-colnames-generic
#' @export
setMethod("rownames", signature(x = "metaData"), function(x) rownames(x[]))



Expand All @@ -71,3 +79,21 @@ setMethod("dimnames", signature(x = "exprObj"), function(x) dimnames(x[]))
#' @rdname dimnames
#' @export
setMethod("dimnames", signature(x = "dimObj"), function(x) dimnames(x[]))

#' @rdname dimnames
#' @export
setMethod("dimnames", signature(x = "spatLocsObj"), function(x) dimnames(x[]))

#' @rdname dimnames
#' @export
setMethod("dimnames", signature(x = "metaData"), function(x) dimnames(x[]))

#' @rdname dimnames
#' @export
setMethod("dimnames", signature(x = "enrData"), function(x) dimnames(x[]))

#' @rdname dimnames
#' @export
setMethod("dimnames", signature(x = "dimObj"), function(x) dimnames(x[]))


2 changes: 1 addition & 1 deletion R/methods-rbind.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ setMethod(
stop("rbind: `spatLocsObj` with the same IDs cannot be joined",
call. = FALSE)
}

# if one is 3d, ensure both are 3d
x3 <- .is_3d_spatlocs(x)
y3 <- .is_3d_spatlocs(y)
Expand Down
12 changes: 12 additions & 0 deletions man/dimnames.Rd

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

4 changes: 4 additions & 0 deletions man/row-plus-colnames-generic.Rd

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

0 comments on commit 5dde81f

Please sign in to comment.