Skip to content

Commit

Permalink
getter functions
Browse files Browse the repository at this point in the history
  • Loading branch information
noriakis committed Nov 8, 2023
1 parent b6d8fb5 commit ef93536
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/module_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ setMethod("show",
}
)

setGeneric("get_module_attribute",
function(x, ...) standardGeneric("get_module_attribute"))

setMethod("get_module_attribute", "kegg_module",
function(x, attribute) attr(x, attribute))

#' module
#' KEGG module parsing function
#' @param mid KEGG module ID
Expand Down
6 changes: 6 additions & 0 deletions R/network_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ setMethod("show",
}
)

setGeneric("get_network_attribute",
function(x, ...) standardGeneric("get_network_attribute"))

setMethod("get_network_attribute", "kegg_network",
function(x, attribute) attr(x, attribute))

#' KEGG network parsing function
#'
#' parsing the network elements starting with N
Expand Down

0 comments on commit ef93536

Please sign in to comment.