Skip to content

Commit 2ada6b6

Browse files
committed
Merge branch 'igraph' into dev
* igraph: Increment version number to 1.2.3.9000 🐞 Fix: rename deprecated igraph functions
2 parents 86b9167 + fc48992 commit 2ada6b6

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: DIscBIO
22
Date: 2026-01-08
33
Title: A User-Friendly Pipeline for Biomarker Discovery in Single-Cell Transcriptomics
4-
Version: 1.2.3
4+
Version: 1.2.3.9000
55
Authors@R:
66
c(
77
person(

NAMESPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ importFrom(httr,status_code)
9191
importFrom(igraph,E)
9292
importFrom(igraph,V)
9393
importFrom(igraph,as_adjacency_matrix)
94-
importFrom(igraph,average.path.length)
94+
importFrom(igraph,mean_distance)
9595
importFrom(igraph,betweenness)
9696
importFrom(igraph,degree)
9797
importFrom(igraph,distance_table)
98-
importFrom(igraph,get.adjacency)
98+
importFrom(igraph,as_adjacency_matrix)
9999
importFrom(igraph,get.edgelist)
100100
importFrom(igraph,get.shortest.paths)
101-
importFrom(igraph,graph.data.frame)
101+
importFrom(igraph,graph_from_data_frame)
102102
importFrom(igraph,graph_from_adjacency_matrix)
103103
importFrom(igraph,mean_distance)
104104
importFrom(igraph,mst)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# DIscBIO (development version)
2+
3+
* Replaced deprecated functions from `igraph`
4+
15
# DIscBIO 1.2.3
26

37
* Delinted package

R/NetAnalysis.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#' PPI function.
88
#' @param export if `TRUE`, exports the analysis table as a csv file
99
#' @param FileName suffix for the file name (if export = TRUE)
10-
#' @importFrom igraph graph.data.frame as_adjacency_matrix distance_table
11-
#' average.path.length get.adjacency V E mean_distance betweenness
10+
#' @importFrom igraph graph_from_data_frame as_adjacency_matrix distance_table
11+
#' mean_distance as_adjacency_matrix V E mean_distance betweenness
1212
#' @importFrom NetIndices GenInd
1313
#' @return A network analysis table
1414
NetAnalysis <- function(
@@ -17,7 +17,7 @@ NetAnalysis <- function(
1717
stop("No Protein-Protein Interactions")
1818
}
1919
df <- data[, -c(1, 2)]
20-
gg <- graph.data.frame(df)
20+
gg <- graph_from_data_frame(df)
2121
betweenness <- betweenness(gg)
2222
betweenness.table <- data.frame(betweenness)
2323
names <- rownames(betweenness.table)
@@ -38,14 +38,14 @@ NetAnalysis <- function(
3838
write.csv(AnalysisTable, file = paste0(FileName, ".csv"))
3939
}
4040

41-
test.graph.adj <- get.adjacency(gg, sparse = FALSE)
41+
test.graph.adj <- as_adjacency_matrix(gg, sparse = FALSE)
4242
test.graph.properties <- GenInd(test.graph.adj)
4343
message("Number of nodes: ", test.graph.properties$N)
4444
message("Number of links: ", test.graph.properties$Ltot)
4545
message("Link Density: ", test.graph.properties$LD)
4646
message("The connectance of the graph: ", test.graph.properties$C)
4747
message("Mean Distences", mean_distance(gg))
48-
message("Average Path Length", average.path.length(gg), "\n")
48+
message("Average Path Length", mean_distance(gg), "\n")
4949
AnalysisTable <-
5050
AnalysisTable[order(AnalysisTable[, 2], decreasing = TRUE), ]
5151
return(AnalysisTable)

0 commit comments

Comments
 (0)