Skip to content

Commit

Permalink
is.graph replaced by is_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
RonaldVisser committed Mar 29, 2024
1 parent 9fa3457 commit 75d140f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/clique_community_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#' @importFrom magrittr %>%

clique_community_names <- function(g, k = 3) {
if (!igraph::is.igraph(g)) {
if (!igraph::is_igraph(g)) {
stop(paste0("Please use an igraph object as input. The current object is an ", class(g), "."))
}
if (k > igraph::clique_num(g)) {
Expand Down
2 changes: 1 addition & 1 deletion R/clique_community_names_par.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' @importFrom foreach %dopar%

clique_community_names_par <- function(g, k = 3, n_core = 4) {
if (!igraph::is.igraph(g)) {
if (!igraph::is_igraph(g)) {
stop(paste0("Please use an igraph object as input. The current object is an ", class(g), "."))
}
doParallel::registerDoParallel(cores = n_core)
Expand Down
2 changes: 1 addition & 1 deletion R/cyto_create_cpm_style.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cyto_create_cpm_style <- function(graph_input, k = 3, com_k = NULL, style_name =
if ("GreyNodesLabel" %in% RCy3::getVisualStyleNames() == FALSE) {
RCy3::importVisualStyles(filename = system.file("extdata", "NetworkStyles.xml", package = "dendroNetwork"))
}
if (!igraph::is.igraph(graph_input)) {
if (!igraph::is_igraph(graph_input)) {
stop(paste0("Please use an igraph object as input. The current object is an ", class(graph_input), "."))
}
if (is.null(com_k)) {
Expand Down
2 changes: 1 addition & 1 deletion R/cyto_create_gn_style.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cyto_create_gn_style <- function(graph_input, gn_coms = NULL, style_name = "auto
if ("GreyNodesLabel" %in% RCy3::getVisualStyleNames() == FALSE) {
RCy3::importVisualStyles(filename = system.file("extdata", "NetworkStyles.xml", package = "dendroNetwork"))
}
if (!igraph::is.igraph(graph_input)) {
if (!igraph::is_igraph(graph_input)) {
stop(paste0("Please use an igraph object as input. The current object is an ", class(graph_input), "."))
}
if (style_name == "auto") {
Expand Down
2 changes: 1 addition & 1 deletion R/cyto_create_graph.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cyto_create_graph <- function(graph_input,
message("Cytoscape is not running, please start Cytoscape first")
stop()
}
if (!igraph::is.igraph(graph_input)) {
if (!igraph::is_igraph(graph_input)) {
stop(paste0("Please use an igraph object as input. The current object is an ", class(graph_input), "."))
}
varnames <- all.vars(match.call())
Expand Down
2 changes: 1 addition & 1 deletion R/find_all_cpm_com.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


find_all_cpm_com <- function(graph_input, n_core = 0) {
if (!igraph::is.igraph(graph_input)) {
if (!igraph::is_igraph(graph_input)) {
stop(paste0("Please use an igraph object as input. The current object is an ", class(graph_input), "."))
}
if (n_core > 1) {
Expand Down
2 changes: 1 addition & 1 deletion R/gn_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' @importFrom magrittr %>%

gn_names <- function(g) {
if (!igraph::is.igraph(g)) {
if (!igraph::is_igraph(g)) {
stop(paste0("Please use an igraph object as input. The current object is an ", class(g), "."))
}
g_GN <- igraph::cluster_edge_betweenness(g,
Expand Down

0 comments on commit 75d140f

Please sign in to comment.