Skip to content

Commit

Permalink
Merge branch 'main' into feat/github-workflow-build-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
vapolonio authored Apr 12, 2024
2 parents decdf43 + 7c72bbb commit 5b11250
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 342 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
Expand All @@ -8,3 +7,4 @@ renv
/Meta/
.DS_Store
doc
.Rproj.user
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Package: PathwaySpace
Type: Package
Title: Spatial projection of network signals along geodesic paths
Version: 0.99.6
Version: 0.99.0
Authors@R:
c(person("Vinicius", "Chagas", role = "ctr"),
person("Victor", "Apolonio", role = "ctr"),
person("Mauro", "Castro", role = c("aut", "cre"),
email = "mauro.a.castro@gmail.com",
comment = c(ORCID = "0000-0003-4942-8131")))
Depends: R(>= 4.2), methods
Imports: grDevices, stats, scales, igraph, RANN, ggplot2, ggrepel, ggforce, grid
Depends: R(>= 4.2), methods, RGraphSpace
Imports: grDevices, stats, scales, igraph, RANN, ggplot2, ggrepel
Suggests: knitr, rmarkdown, RUnit, BiocGenerics, BiocStyle, RedeR
Description: For a given graph containing vertices, edges, and a signal associated with the vertices, the PathwaySpace package performs a convolution operation, which involves a weighted combination of neighboring vertices and their associated signals. The package then uses a decay function to project these signals, creating geodesic paths on a 2D-image space. *PathwaySpace* could have various applications, such as visualizing and analyzing network data in a graphical format that highlights the relationships and signal strengths between vertices. It can be particularly useful for understanding the influence of signals through complex networks. By combining graph theory, signal processing, and visualization, the *PathwaySpace* package provides a novel way of representing and analyzing graph data.
License: Artistic-2.0
Expand All @@ -25,7 +25,6 @@ Collate:
pspaceClasses.R
pspaceGenerics.R
pspaceMethods.R
pspaceImage.R
pspaceGraph.R
pspacePlots.R
Encoding: UTF-8
RoxygenNote: 7.2.3
9 changes: 2 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ exportMethods(circularProjection)
exportMethods(getPathwaySpace)
exportMethods(length)
exportMethods(names)
exportMethods(plotGraphSpace)
exportMethods(plotImageSpace)
exportMethods(plotPathwaySpace)
exportMethods(polarProjection)
exportMethods(silhouetteMapping)
exportMethods(summitMapping)
exportMethods(vertexSignal)
exportMethods(vertexWeight)
import(methods)
importFrom(RANN,nn2)
importFrom(ggforce,geom_circle)
importFrom(RGraphSpace,plotGraphSpace)
importFrom(ggplot2,aes)
importFrom(ggplot2,annotate)
importFrom(ggplot2,coord_fixed)
Expand All @@ -31,9 +30,7 @@ importFrom(ggplot2,element_line)
importFrom(ggplot2,element_rect)
importFrom(ggplot2,element_text)
importFrom(ggplot2,expansion)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_raster)
importFrom(ggplot2,geom_segment)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,margin)
importFrom(ggplot2,scale_fill_gradientn)
Expand All @@ -48,8 +45,6 @@ importFrom(grDevices,col2rgb)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,convertColor)
importFrom(grDevices,rgb)
importFrom(grid,arrow)
importFrom(grid,unit)
importFrom(igraph,'E<-')
importFrom(igraph,'V<-')
importFrom(igraph,E)
Expand Down
3 changes: 1 addition & 2 deletions R/pspaceClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
#' @method silhouetteMapping \code{\link{silhouetteMapping}}
#' @method summitMapping \code{\link{summitMapping}}
#' @method getPathwaySpace \code{\link{getPathwaySpace}}
#' @method plotImageSpace \code{\link{plotImageSpace}}
#' @method plotGraphSpace \code{\link{plotGraphSpace}}
#' @method plotPathwaySpace \code{\link{plotPathwaySpace}}
#' @aliases PathwaySpace-class
#' @return An S4 class object.
#' @section Constructor:
Expand Down
14 changes: 2 additions & 12 deletions R/pspaceGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ setGeneric("summitMapping",
}, package = "PathwaySpace"
)

setGeneric("plotImageSpace",
setGeneric("plotPathwaySpace",
function(pts, colors = pspace.cols(), trim.colors = c(3, 2, 1, 2, 3),
bg.color = "grey85", theme.name = c("th0", "th1", "th2", "th3"),
title = "PathwaySpace", font.size = 1, font.color = "white",
Expand All @@ -36,17 +36,7 @@ setGeneric("plotImageSpace",
add.contour = TRUE, contour.color = "white", marks = FALSE,
mark.size = 3, mark.color = "white", mark.padding = 0.5,
mark.line.width = 0.5, use.dotmark = FALSE) {
standardGeneric("plotImageSpace")
}, package = "PathwaySpace"
)

setGeneric("plotGraphSpace",
function(pts, node.size = 1, edge.width = 0.5,
node.color = "grey50", edge.color = "grey80", bg.color = "grey95",
font.size = 1, theme.name = c("th0", "th1", "th2", "th3"),
xlab = "Pathway coordinates 1", ylab = "Pathway coordinates 2",
marks = FALSE, mark.size = 3, mark.color = "grey20") {
standardGeneric("plotGraphSpace")
standardGeneric("plotPathwaySpace")
}, package = "PathwaySpace"
)

Expand Down
209 changes: 0 additions & 209 deletions R/pspaceGraph.R

This file was deleted.

4 changes: 2 additions & 2 deletions R/pspaceMisc.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' \tab Mapping summits on a 2D-landscape image.\cr
#' \link{getPathwaySpace}:
#' \tab Accessory method for fetching slots from a PathwaySpace object.\cr
#' \link{plotImageSpace}:
#' \link{plotPathwaySpace}:
#' \tab Plotting 2D-landscape images for the PathwaySpace package.\cr
#' }
#' Further information is available in the vignettes by typing
Expand Down Expand Up @@ -213,7 +213,7 @@ NULL
#'
#' @param n Number of colors.
#' @return A vector with hexadecimal color codes.
#' @seealso \code{\link{plotImageSpace}}
#' @seealso \code{\link{plotPathwaySpace}}
#' @examples
#' pspace.cols()
#'
Expand Down
11 changes: 6 additions & 5 deletions R/pspaceImage.R → R/pspacePlots.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @title Plotting 2D-landscape images for the PathwaySpace package.
#'
#' @description \code{plotImageSpace} is a wrapper function to
#' @description \code{plotPathwaySpace} is a wrapper function to
#' create dedicated ggplot graphics for PathwaySpace-class objects.
#'
#' @param pts A \linkS4class{PathwaySpace} class object.
Expand Down Expand Up @@ -67,7 +67,7 @@
#' pts <- silhouetteMapping(pts)
#'
#' # Plot a 2D-landscape image
#' plotImageSpace(pts)
#' plotPathwaySpace(pts)
#'
#' @import methods
#' @docType methods
Expand All @@ -79,11 +79,12 @@
#' @importFrom ggrepel geom_text_repel
#' @importFrom grDevices convertColor col2rgb rgb
#' @importFrom grDevices adjustcolor colorRampPalette
#' @rdname plotImageSpace-methods
#' @aliases plotImageSpace
#' @importFrom RGraphSpace plotGraphSpace
#' @rdname plotPathwaySpace-methods
#' @aliases plotPathwaySpace
#' @export
#'
setMethod("plotImageSpace", "PathwaySpace",
setMethod("plotPathwaySpace", "PathwaySpace",
function(pts, colors = pspace.cols(), trim.colors = c(3, 2, 1, 2, 3),
bg.color = "grey85", theme.name = c("th0", "th1", "th2", "th3"),
title = "PathwaySpace", font.size = 1, font.color = "white",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ BiocManager::install("BiocStyle")

```r
install.packages("remotes")
remotes::install_github("sysbiolab/RGraphSpace", build_vignettes=TRUE)
remotes::install_github("sysbiolab/PathwaySpace", build_vignettes=TRUE)
```

Expand Down
Binary file modified data/PCv12_pruned_igraph.RData
Binary file not shown.
2 changes: 1 addition & 1 deletion man/PathwaySpace-package.Rd

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

Loading

0 comments on commit 5b11250

Please sign in to comment.