Skip to content

Commit

Permalink
add missing *_keys functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Sep 20, 2023
1 parent e56b2dc commit b4e1239
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions R/AbstractAnnData.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ AbstractAnnData <- R6::R6Class("AbstractAnnData", # nolint
NULL
}
if (length(keys) > 0) {
cat(
" ", attribute, ":",
cat(
" ", attribute, ":",
paste("'", keys, "'", collapse = ", "),
"\n", sep = ""
)
}
"\n", sep = ""
)
}
}
},

#' @description Dimensions (observations x variables) of the AnnData object.
Expand Down Expand Up @@ -133,6 +133,22 @@ AbstractAnnData <- R6::R6Class("AbstractAnnData", # nolint
layers_keys = function() {
names(self$layers)
},
#' @description Keys (element names) of `obsm`.
obsm_keys = function() {
names(self$obsm)
},
#' @description Keys (element names) of `varm`.
varm_keys = function() {
names(self$varm)
},
#' @description Keys (element names) of `obsp`.
obsp_keys = function() {
names(self$obsp)
},
#' @description Keys (element names) of `varp`.
varp_keys = function() {
names(self$varp)
},
#' @description Convert to SingleCellExperiment
to_SingleCellExperiment = function() {
to_SingleCellExperiment(self)
Expand Down

0 comments on commit b4e1239

Please sign in to comment.