Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
noriakis committed Aug 21, 2023
1 parent 9b1e7bc commit 2230c93
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/ggkegg.R
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ ggkegg <- function(pid,
#' @examples
#' if (require("clusterProfiler")) {
#' cp <- enrichKEGG(c("1029","4171"))
#' \dontrun{rawMap(list(cp,cp), pid="hsa04110")}
#' ## Multiple class object can be passed by list
#' rawMap(list(cp,cp), pid="hsa04110")
#' }
#' @return ggraph with overlaid KEGG map
#'
Expand Down Expand Up @@ -300,6 +301,7 @@ rawMap <- function(enrich, pathway_number=1, pid=NULL,
#' typically, "gene", "ortholog", or "compound"
#' @export
#' @examples
#' ## Colorize by passing the named vector of numeric values
#' rv <- rawValue(c(1.1) |> setNames("hsa:6737"),
#' man_graph=create_test_pathway())
#' @return ggraph with overlaid KEGG map
Expand Down
10 changes: 10 additions & 0 deletions R/highlight_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
#' @return boolean vector
#' @examples
#' graph <- create_test_pathway()
#' ## Highlight set of nodes by specifying ID
#' graph <- graph |> mutate(hl=highlight_set_nodes(c("hsa:51428")))
#'
#' ## node column can be specified by `name` argument
#' graph <- graph |>
#' mutate(hl=highlight_set_nodes(c("DDX41"), name="graphics_name"))
highlight_set_nodes <- function(set, how="all",
name="name", sep=" ", no_sep=FALSE) {
graph <- .G()
Expand Down Expand Up @@ -63,6 +68,10 @@ highlight_set_nodes <- function(set, how="all",
#' @return boolean vector
#' @examples
#' graph <- create_test_pathway()
#'
#' ## Specify edge column by `name`
#' ## In this example, edges having `degradation` value in
#' ## `subtype_name` column will be highlighted
#' graph <- graph |> activate("edges") |>
#' mutate(hl=highlight_set_edges(c("degradation"), name="subtype_name"))
#'
Expand Down Expand Up @@ -110,6 +119,7 @@ highlight_set_edges <- function(set, how="all",
#' @export
#' @return boolean vector
#' @examples
#' ## Highlight module within the pathway
#' graph <- create_test_pathway()
#' mo <- create_test_module()
#' graph <- graph |> highlight_module(mo)
Expand Down
1 change: 1 addition & 0 deletions man/highlight_module.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/highlight_set_edges.Rd

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

5 changes: 5 additions & 0 deletions man/highlight_set_nodes.Rd

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

3 changes: 2 additions & 1 deletion man/rawMap.Rd

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

1 change: 1 addition & 0 deletions man/rawValue.Rd

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

0 comments on commit 2230c93

Please sign in to comment.