Giter Club home page Giter Club logo

graphsim's Introduction

Travis-CI Build Status CircleCI build status AppVeyor Build Status Project Status: Active – The project has reached a stable, usable state and is being actively developed.

CRAN_Status_Badge Downloads Total Downloads

DOI bioRxiv status


graphsim

Version 1.0.3

Simulate Expression Data from 'igraph' Networks

This package provides functions to develop simulated continuous data (e.g., gene expression) from a sigma covariance matrix derived from a graph structure in 'igraph' objects. Intended to extend 'mvtnorm' to take 'igraph' structures rather than sigma matrices as input. This allows the use of simulated data that correctly accounts for pathway relationships and correlations. Here we present a versatile statistical framework to simulate correlated gene expression data from biological pathways, by sampling from a multivariate normal distribution derived from a graph structure. This package allows the simulation of biological pathways from a graph structure based on a statistical model of gene expression, such as simulation of expression profiles that of log-transformed and normalised data from microarray and RNA-Seq data.

Motivation

Network analysis of molecular biological pathways is important for insights into biology and medical genetics. Gene expression profiles capture the regulatory state of a cell and can be used to analyse complex molecular states with genome-scale data. Biological pathways are more than simply sets of genes involved in functions, they are rich in information of relationships defined by pathway structure.

Methods to infer biological pathways and gene regulatory networks from gene expression data can be tested on simulated datasets using this framework. This also allows for pathway structures to be considered as a confounding variable when simulating gene expression data to test the performance of genomics analyses.

This package enables the generation of simulated gene expression datasets containing pathway relationships from a known underlying network. These simulated datasets can be used to evaluate various bioinformatics methodologies, including statistical and network inference procedures.

Network analysis techniques have an important role in understanding of biological pathways and interpretation of genomics studies. Modelling biological pathways allows the evaluation of gene regulatory network inference techniques (which so far rely on experimental validation or resampling). This technique also enables modelling datasets with correlated pathway-structures to assess whether other genomics analysis techniques perform as expected with the background of complex pathways.

Installation

To install the latest release from CRAN:

install.packages("graphsim")

To install the stable release of this package from github:

# install.packages("devtools")
devtools::install_github("TomKellyGenetics/graphsim", ref = "master")

To get the development version of this package from github:

# install.packages("devtools")
devtools::install_github("TomKellyGenetics/graphsim", ref = "dev")

Usage

Please see the vignettes for demonstrations of this package on examples of simple simulated networks and the reactome pathway TGF-β receptor signaling activates SMADs (R-HSA-2173789). An article with further details has been published in the Journal of Open Source Software.

A help menu can also be accessed within the R environment:

?graphsim
help("graphsim-package")

This will display a help page and link to documentation for each function.


Citation

To cite package 'graphsim' in publications use:

S. Thomas Kelly and Michael A. Black (2020). graphsim: Simulate Expression Data from 'igraph' Networks. R package version 1.0.3. https://github.com/TomKellyGenetics/graphsim doi:10.5281/zenodo.3931288

A BibTeX entry for LaTeX users is:

  @Manual{,
    title = {{graphsim}: Simulate Expression Data from 'igraph' Networks },
    author = {S. Thomas Kelly and Michael A. Black},
    year = {2020},
    note = {R package version R package version 1.0.3.},
    url = {https://github.com/TomKellyGenetics/graphsim},
    doi = {10.5281/zenodo.3931288},
  }

Please also cite the publication describing use of this package where appropriate.

Kelly, S.T. and Black, M.A. (2020). graphsim: An R package for simulating gene expression data from graph structures of biological pathways. Journal of Open Source Software, 5(51), 2161, https://doi.org/10.21105/joss.02161

  @article{Kelly2020joss02161,
    doi = {10.21105/joss.02161},
    url ={https://doi.org/10.21105/joss.02161},
    year = {2020},
    publisher = {The Open Journal},
    volume = {5},
    number = {51},
    pages = {2161},
    author = {S. Thomas Kelly and Michael A. Black},
    title = {graphsim: An R package for simulating gene expression data from graph structures of biological pathways},
    journal = {Journal of Open Source Software} }

This article is also avaliable as a preprint.

S. Thomas Kelly, Michael A. Black (2020) graphsim: An R package for simulating gene expression data from graph structures of biological pathways bioRxiv 2020.03.02.972471; doi:https://doi.org/10.1101/2020.03.02.972471

@article {Kelly2020.03.02.972471,
	author = {Kelly, S Thomas and Black, Michael A},
	title = {graphsim: An R package for simulating gene expression data from graph structures of biological pathways},
	elocation-id = {2020.03.02.972471},
	year = {2020},
	doi = {10.1101/2020.03.02.972471},
	publisher = {Cold Spring Harbor Laboratory},
	URL = {https://www.biorxiv.org/content/early/2020/03/04/2020.03.02.972471},
	eprint = {https://www.biorxiv.org/content/early/2020/03/04/2020.03.02.972471.full.pdf},
	journal = {bioRxiv}
}

Contributions and Bug Reports

Please submit issues on GitHub to report problems or suggest features. Pull requests to the dev branch on GitHub are also welcome to add features or correct problems. Please see the contributor guide for more details.

graphsim's People

Contributors

rcannood avatar tomkellygenetics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

graphsim's Issues

common link graph returned invisibly

Is it intended for the common link graph computed by make_commonlink_graph() to be returned invisibly, whereas other functions use return() (which ensures that the returned object is printed)? I'm flagging it in case the different behavior was accidental.

Part of this JOSS review.

igraph dependency

Is graphsim meant to be used (a) always in tandem with igraph or (b) sometimes in a standalone way? The examples all load igraph, but many of them still work if the occasional igraph functions are accessed using igraph::. If the package is not meant to be used without also loading igraph, then perhaps it makes sense for igraph to be listed under Depends rather than Imports (in the DESCRIPTION); or, if the package is meant to be used, at least sometimes, on its own, then perhaps some examples could do without loading igraph? Maybe the current design is intentional, and my review won't hinge on this, but i thought it worth asking.

(Also, a formatting point: the igraph package is usually formatting in all-lowercase, rather than "iGraph", as sometimes appears in the documentation.)

Part of this JOSS review.

CRAN: reduce build-time for vignettes (to pass checks)

Changes requested by CRAN.

Dear maintainer,

Please see the problems shown on
https://cran.r-project.org/web/checks/check_results_graphsim.html.
Please correct before 2020-07-22 to safely retain your package on CRAN.

The CRAN Team

Clarification

For the record, the issue is that re-building

simulate_expression.Rmd

is hitting CPU/elapsed time limits, which it did not previously do.

CRAN Package Check Results for Package graphsim
Last updated on 2020-07-08 13:50:00 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0.0 8.95 681.97 690.92 WARN  
r-devel-linux-x86_64-debian-gcc 1.0.0 7.71 534.53 542.24 OK  
r-devel-linux-x86_64-fedora-clang 1.0.0     866.74 WARN  
r-devel-linux-x86_64-fedora-gcc 1.0.0     934.84 WARN  
r-devel-windows-ix86+x86_64 1.0.0 18.00 664.00 682.00 OK  
r-patched-linux-x86_64 1.0.0 8.99 679.53 688.52 WARN  
r-patched-solaris-x86 1.0.0     988.80 NOTE  
r-release-linux-x86_64 1.0.0 10.22 679.27 689.49 WARN  
r-release-osx-x86_64 1.0.0       NOTE  
r-release-windows-ix86+x86_64 1.0.0 19.00 654.00 673.00 OK  
r-oldrel-osx-x86_64 1.0.0       NOTE  
r-oldrel-windows-ix86+x86_64 1.0.0 21.00 974.00 995.00 OK  
Check Details
Version: 1.0.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'plots_directed.Rmd' using rmarkdown
    
    Attaching package: 'igraph'
    
    The following objects are masked from 'package:stats':
    
     decompose, spectrum
    
    The following object is masked from 'package:base':
    
     union
    
    --- finished re-building 'plots_directed.Rmd'
    
    --- re-building 'simulate_expression.Rmd' using rmarkdown
    
    Attaching package: 'igraph'
    
    The following objects are masked from 'package:stats':
    
     decompose, spectrum
    
    The following object is masked from 'package:base':
    
     union
    
    
    Attaching package: 'gplots'
    
    The following object is masked from 'package:stats':
    
     lowess
    
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_structure, state, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_diverging, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_diverging, state, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_converging, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_converging, state, cor = 0.8, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_reconnecting, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in eattrs[[name]][index] <- value :
     number of items to replace is not a multiple of replacement length
    Warning in eattrs[[name]][index] <- value :
     number of items to replace is not a multiple of replacement length
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_reconnecting, state, cor = 0.8, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, RAF_MAP_graph, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, Pi3K_graph, cor = 0.8, mean = 0, comm = FALSE, :
     sigma matrix was not positive definite, nearest approximation used.
    Killed
    SUMMARY: processing the following file failed:
     'simulate_expression.Rmd'
    
    Error: Vignette re-building failed.
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 1.0.0
Check: dependencies in R code
Result: NOTE
    Namespace in Imports field not imported from: ‘utils’
     All declared Imports should be used.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 1.0.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘plots_directed.Rmd’ using rmarkdown
    
    Attaching package: 'igraph'
    
    The following objects are masked from 'package:stats':
    
     decompose, spectrum
    
    The following object is masked from 'package:base':
    
     union
    
    --- finished re-building ‘plots_directed.Rmd’
    
    Warning: elapsed-time limit of 30 minutes reached for sub-process
    --- re-building ‘simulate_expression.Rmd’ using rmarkdown
    
    Attaching package: 'igraph'
    
    The following objects are masked from 'package:stats':
    
     decompose, spectrum
    
    The following object is masked from 'package:base':
    
     union
    
    
    Attaching package: 'gplots'
    
    The following object is masked from 'package:stats':
    
     lowess
    
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_structure, state, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_diverging, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_diverging, state, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_converging, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_converging, state, cor = 0.8, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_reconnecting, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in eattrs[[name]][index] <- value :
     number of items to replace is not a multiple of replacement length
    Warning in eattrs[[name]][index] <- value :
     number of items to replace is not a multiple of replacement length
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_reconnecting, state, cor = 0.8, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, RAF_MAP_graph, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, Pi3K_graph, cor = 0.8, mean = 0, comm = FALSE, :
     sigma matrix was not positive definite, nearest approximation used.
    
    Execution halted
    SUMMARY: processing the following file failed:
     ‘simulate_expression.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.0.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘plots_directed.Rmd’ using rmarkdown
    
    Attaching package: 'igraph'
    
    The following objects are masked from 'package:stats':
    
     decompose, spectrum
    
    The following object is masked from 'package:base':
    
     union
    
    --- finished re-building ‘plots_directed.Rmd’
    
    Warning: elapsed-time limit of 30 minutes reached for sub-process
    --- re-building ‘simulate_expression.Rmd’ using rmarkdown
    
    Attaching package: 'igraph'
    
    The following objects are masked from 'package:stats':
    
     decompose, spectrum
    
    The following object is masked from 'package:base':
    
     union
    
    
    Attaching package: 'gplots'
    
    The following object is masked from 'package:stats':
    
     lowess
    
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in doTryCatch(return(expr), name, parentenv, handler) :
     "thincolsep" is not a graphical parameter
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_structure, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_structure, state, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_diverging, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_diverging, state, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_converging, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_converging, state, cor = 0.8, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, graph_reconnecting, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in eattrs[[name]][index] <- value :
     number of items to replace is not a multiple of replacement length
    Warning in eattrs[[name]][index] <- value :
     number of items to replace is not a multiple of replacement length
    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
     longer object length is not a multiple of shorter object length
    Warning in generate_expression(100, graph_reconnecting, state, cor = 0.8, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, RAF_MAP_graph, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, Pi3K_graph, cor = 0.8, mean = 0, comm = FALSE, :
     sigma matrix was not positive definite, nearest approximation used.
    Warning in generate_expression(100, Pi3K_AKT_graph, cor = 0.8, mean = 0, :
     sigma matrix was not positive definite, nearest approximation used.
    
    Execution halted
    SUMMARY: processing the following file failed:
     ‘simulate_expression.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: [r-devel-linux-x86_64-fedora-gcc](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/graphsim-00check.html)

WARNINGS:

    Warning in sd * t(sig) :
     longer object length is not a multiple of shorter object length
    Warning in t(sd * t(sig)) * sd :
    Execution halted
    SUMMARY: processing the following file failed:
     ‘simulate_expression.Rmd’

One of the example datasets (Pi3K/AKT) in /data is larger than the others so takes longer to run. I can flag this as eval=FALSE in Rmarkdown to skip it during checks if that is acceptable. I would prefer to keep the pre-rendered HTML vignettes displayed on CRAN.

Another option (as suggested by CRAN):

Or use precomputed results, so that the code and the displayed file match?

Publication of graphsim has been accepted with JOSS so if possible, I will wait for this to be published online. I've planned to submit a minor release to update the citation information then. I should be able to address the issue with building vignettes then as well as remaining suggestions for documentation.

It seems that CRAN has a timeout of 10 minutes. I saw this while running checks on the package before release (but it passed on Travis and CRAN).

Check: Overall checktime, Result: NOTE
  Overall checktime 16 min > 10 min

Timing varies depending on the performance of the CRAN build nodes so devtools checks are only advice based on local builds.

devtools::check() with eval=FALSE on chunk simulation_Pi3K_AKT_graph_hide:

─  installing the package to build vignettes
✓  creating vignettes (14.5s)
devtools::check() with eval=TRUE on chunk simulation_Pi3K_AKT_graph_hide:

─  installing the package to build vignettes
✓  creating vignettes (5m 31.7s)
.
.
.
✓  checking re-building of vignette outputs (7m 18.8s)
✓  checking for non-standard things in the check directory
✓  checking for detritus in the temp directory
   
   See
     ‘/Users/tom/Downloads/packages/graphsim.Rcheck/00check.log’
   for details.
   
   
── R CMD check results ───────────────────────────────────── graphsim 1.0.0 ────
Duration: 8m 42.1s

Note the examples and tests are not time-consuming to run.

✓   checking examples (12.8s)
   Examples with CPU (user + system) or elapsed time > 5s
                        user system elapsed
   generate_expression 4.292  0.161   5.939
==> devtools::test()

Loading graphsim
Testing graphsim
✓ |  OK F W S | Context
✓ |   7       | Make Adjacency Matrix
✓ |  17       | Make Commonlink Matrix
✓ |  25       | Make Distance Matrix
✓ |  40       | Generate Expression Data [0.4 s]
✓ |  17       | Make Laplacian Matrix
⠏ |   0       | Plot Directed GraphsNULL
NULL
⠙ |   2       | Plot Directed GraphsNULL
NULL
⠸ |   4       | Plot Directed GraphsNULL
NULL
⠴ |   6       | Plot Directed GraphsNULL
NULL
✓ |   8       | Plot Directed Graphs [0.6 s]
✓ |  71       | Make Sigma Matrix [0.3 s]
✓ | 108       | Make State Matrix [0.2 s]

══ Results ═════════════════════════════════════════════════════════════════════════════════════
Duration: 1.9 s

OK:       293
Failed:   0
Warnings: 0
Skipped:  0

edges not rendered using character argument to state parameter

I'm just running through the examples in the JOSS paper, and i've encountered a problem with the plot_directed() function. As illustrated below, while the function accepts the correctly-spelled character string (contrast to when the string is misspelled), it fails to render the edges; they are successfully rendered when using a numeric sign (1 or -1) instead of a character.

I have igraph installed from CRAN, and i installed the current version of graphsim from GitHub.

library(igraph)
#> 
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:stats':
#> 
#>     decompose, spectrum
#> The following object is masked from 'package:base':
#> 
#>     union
library(graphsim)
graph_edges <- rbind(c("A", "C"), c("B", "C"), c("C", "D"), c("D", "E"),
                     c("D", "F"), c("F", "G"), c("F", "I"), c("H", "I"))
graph <- graph.edgelist(graph_edges, directed = TRUE)
# using the character string
plot_directed(graph, state = "activating", layout = layout.kamada.kawai,
              cex.node = 3, cex.arrow = 5, arrow_clip = 0.2)

# using a single sign
plot_directed(graph, state = 1, layout = layout.kamada.kawai,
              cex.node = 3, cex.arrow = 5, arrow_clip = 0.2)

# using a different character string
plot_directed(graph, state = "activate", layout = layout.kamada.kawai,
              cex.node = 3, cex.arrow = 5, arrow_clip = 0.2)
#> Warning in plot_directed(graph, state = "activate", layout =
#> layout.kamada.kawai, : please give state as a scalar or vector of
#> length(E(graph))
#> Error in plot_directed(graph, state = "activate", layout = layout.kamada.kawai, :

Created on 2020-03-20 by the reprex package (v0.3.0)

Part of this JOSS review.

[JOSS Review]

Sorry for the delay in my review. Below are several concerns regarding the article and the documentation (related to openjournals/joss-reviews#2161).

  • Refine introduction in README: Better highlight the statement of need. In the article this was clearly stated in the first paragraph. In the readme, not so much.
  • Installation instructions: There's no need to manually install the dependency packages; install.packages("graphsim") will install the dependencies for you.
  • Documentation: Some of the vignettes (e.g. test_graph_divergent.Rmd) do not contain enough documentation / description of the plots being produced to understand what is going on.
  • State of the field: Please compare against similar methods, including dyngen, SERGIO, GeneNetWeaver.
  • Code in manuscript: Remove installation instructions or move it to a separate section. Since graphsim is on cran, the installation instructions can just be install.packages("graphsim"). You don't need to install devtools or igraph.
  • Code in manuscript: Fix syntax highlighting issue at the bottom of page 6 due to trace = "none\",.
  • Code in manuscript: Given that there is a one-to-one relation between the figures generated and the code blocks, would it be desirable to use an Rmd instead of an md file? This part is up for discussion. Example of Rmd JOSS paper: https://github.com/tidyverse/tidyverse/blob/master/vignettes/paper.Rmd

cor default

The make_sigma documentation says that the cor parameter defaults to 0.8, but currently there is no default:

library(igraph, warn.conflicts = FALSE)
library(graphsim)
graph_test_edges <- rbind(c("A", "B"), c("B", "C"), c("B", "D"))
graph_test <- graph.edgelist(graph_test_edges, directed = TRUE)
adjacency_matrix <- make_adjmatrix_graph(graph_test)
make_sigma_mat_adjmat(adjacency_matrix)
#> Error in ifelse(mat > 0, cor, 0): argument "cor" is missing, with no default
make_sigma_mat_adjmat(adjacency_matrix, cor = 0.8)
#>     A   B   C   D
#> A 1.0 0.8 0.0 0.0
#> B 0.8 1.0 0.8 0.8
#> C 0.0 0.8 1.0 0.0
#> D 0.0 0.8 0.0 1.0

Created on 2020-03-25 by the reprex package (v0.3.0)

Either the behavior or the documentation should be changed. : )

Part of this JOSS review.

vignette formatting

Some of the vignettes are not properly formatted when installed. Most notably, section headers do not render due to a lack of space between #, ##, or ### and the header. Some, for example test_graph_network_inhibiting, include very little text and therefore function more as examples than as vignettes. Would it make sense to trim and/or combine the existing vignettes into a smaller number that are more comprehensive and contain thorough exposition?

Part of this JOSS review.

additional documentation

Functions like generate_expression() and plot_directed() are documented with toy examples, while the four empirical networks included with the package are very sparsely documented. I think the value of the documentation in each case would be much increased by including illustrations that apply these functions to the empirical networks. Would this make sense to do, and would it be feasible? (Examples with long runtimes are discouraged by CRAN.)

Part of this JOSS review.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.