diff --git a/.github/workflows/standard-ci-workflow.yml b/.github/workflows/standard-ci-workflow.yml index b58897d..dc1d695 100644 --- a/.github/workflows/standard-ci-workflow.yml +++ b/.github/workflows/standard-ci-workflow.yml @@ -40,6 +40,14 @@ jobs: r-version: ${{ matrix.config.r }} use-public-rspm: true + - name: Install macOS system dependencies + if: runner.os == 'macOS' + run: | + brew install gettext + mkdir -p ~/.R + echo "CPPFLAGS += -I$(brew --prefix gettext)/include" >> ~/.R/Makevars + echo "LDFLAGS += -L$(brew --prefix gettext)/lib" >> ~/.R/Makevars + - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::rcmdcheck diff --git a/.gitignore b/.gitignore index 68b612d..3ecbc0b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ *.so *.o *.pdf -*.Rhistory \ No newline at end of file +*.Rhistory*.tar.gz +*.tar.gz diff --git a/DESCRIPTION b/DESCRIPTION index 7360a23..e0c4642 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ribiosGraph Type: Package -Title: Manipulate and Visualize Graphs in the Ribios Software Suite +Title: Manipulate and Visualize Graphs in the 'ribios' Software Suite Version: 1.1.0 Date: 2026-01-24 Authors@R: @@ -8,11 +8,8 @@ Authors@R: family = "Zhang", role = c("aut", "cre"), email = "jitao_david.zhang@roche.com", - comment = c(ORCID="0000-0002-3085-0909")), - person("F.Hoffmann-La Roche AG", role="cph")) -Description: Tools to manipulate and visualize graphs (networks) for - computational biology in drug discovery. Provides functions for creating - bipartite graphs and interactive visualizations using plotly. + comment = c(ORCID="0000-0002-3085-0909"))) +Description: The package implements tools to manipulate and visualize graphs (networks) for computational biology in drug discovery, for instance functions for creating bipartite graphs and for interactive visualizations. Zhang (2025) . Depends: R (>= 3.4.0), igraph diff --git a/R/exportGML.R b/R/exportGML.R index 07965b8..dd10814 100644 --- a/R/exportGML.R +++ b/R/exportGML.R @@ -10,7 +10,8 @@ fixNodeLabel <- function(name) { #' #' @param igraph An \code{igraph} object #' @param filename Filename -#' +#' @return Invisible NULL +#' @description #' \code{exportGML} exports an \code{igraph} object to GML files #' complying with specifications defined by Cytoscape and yEd. Compared #' to the native \code{write.graph} function provided by the @@ -86,4 +87,5 @@ exportGML <- function(igraph, filename) { } cat("]\n", file=file) close(file) + return(invisible(NULL)) } diff --git a/R/incidence2bipartite.R b/R/incidence2bipartite.R index f1bd0d4..5ad526c 100644 --- a/R/incidence2bipartite.R +++ b/R/incidence2bipartite.R @@ -6,11 +6,9 @@ #' in rows and in columns #' @param label.color A vector of length 2, color of labels of nodes #' in rows and in columns -#' @param V A named list of other node styles, each item of length 1 or 2. -#' In the latter case, the first value is used for nodes in rows and the -#' second for nodes in columns +#' @param V A named list of other node styles, each item of length 1 or 2. In the latter case, the first value is used for nodes in rows and the second for nodes in columns #' @param E A named list of edge styles. Each item must be length of 1. -#' @return A graph +#' @return An instance of \code{igraph} graph #' @importFrom igraph graph_from_incidence_matrix V E `V<-` `E<-` #' @examples #' myIncMat <- matrix(c(0, 0, 1, diff --git a/man/exportGML.Rd b/man/exportGML.Rd index b2ac2d5..bb34db9 100644 --- a/man/exportGML.Rd +++ b/man/exportGML.Rd @@ -9,9 +9,13 @@ exportGML(igraph, filename) \arguments{ \item{igraph}{An \code{igraph} object} -\item{filename}{Filename - - \code{exportGML} exports an \code{igraph} object to GML files +\item{filename}{Filename} +} +\value{ +Invisible NULL +} +\description{ +\code{exportGML} exports an \code{igraph} object to GML files complying with specifications defined by Cytoscape and yEd. Compared to the native \code{write.graph} function provided by the \code{igraph} package, GML files exported with \code{exportGML} can be @@ -24,10 +28,7 @@ complying with specifications defined by Cytoscape and yEd. Compared Edge label: \code{V(igraph)$label}, determining edge target arrow So far the function is mainly used by the \code{ronet.Rscript} script - in the package. Users are invited to adapt the function for other purposes.} -} -\description{ -Export igraph object to GML, friendly to Cytoscape and yEd + in the package. Users are invited to adapt the function for other purposes. } \examples{ g <- barabasi.game(100, directed=FALSE) diff --git a/man/incidence2bipartite.Rd b/man/incidence2bipartite.Rd index 3925280..4591912 100644 --- a/man/incidence2bipartite.Rd +++ b/man/incidence2bipartite.Rd @@ -27,14 +27,12 @@ in rows and in columns} \item{label.color}{A vector of length 2, color of labels of nodes in rows and in columns} -\item{V}{A named list of other node styles, each item of length 1 or 2. -In the latter case, the first value is used for nodes in rows and the -second for nodes in columns} +\item{V}{A named list of other node styles, each item of length 1 or 2. In the latter case, the first value is used for nodes in rows and the second for nodes in columns} \item{E}{A named list of edge styles. Each item must be length of 1.} } \value{ -A graph +An instance of \code{igraph} graph } \description{ Build a bipartite graph with an incidence matrix