Back to Multiple platform build/check report for BioC 3.11
AB[C]DEFGHIJKLMNOPQRSTUVWXYZ

CHECK report for CellNOptR on malbec2

This page was generated on 2020-10-17 11:54:32 -0400 (Sat, 17 Oct 2020).

TO THE DEVELOPERS/MAINTAINERS OF THE CellNOptR PACKAGE: Please make sure to use the following settings in order to reproduce any error or warning you see on this page.
Package 253/1905HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
CellNOptR 1.34.0
A.Gabor
Snapshot Date: 2020-10-16 14:40:19 -0400 (Fri, 16 Oct 2020)
URL: https://git.bioconductor.org/packages/CellNOptR
Branch: RELEASE_3_11
Last Commit: bc86474
Last Changed Date: 2020-04-27 14:27:42 -0400 (Mon, 27 Apr 2020)
malbec2 Linux (Ubuntu 18.04.4 LTS) / x86_64  OK  OK [ WARNINGS ]UNNEEDED, same version exists in internal repository
tokay2 Windows Server 2012 R2 Standard / x64  OK  OK  WARNINGS  OK UNNEEDED, same version exists in internal repository
machv2 macOS 10.14.6 Mojave / x86_64  OK  OK  WARNINGS  OK UNNEEDED, same version exists in internal repository

Summary

Package: CellNOptR
Version: 1.34.0
Command: /home/biocbuild/bbs-3.11-bioc/R/bin/R CMD check --install=check:CellNOptR.install-out.txt --library=/home/biocbuild/bbs-3.11-bioc/R/library --no-vignettes --timings CellNOptR_1.34.0.tar.gz
StartedAt: 2020-10-16 23:39:51 -0400 (Fri, 16 Oct 2020)
EndedAt: 2020-10-16 23:42:23 -0400 (Fri, 16 Oct 2020)
EllapsedTime: 151.4 seconds
RetCode: 0
Status:  WARNINGS 
CheckDir: CellNOptR.Rcheck
Warnings: 5

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.11-bioc/R/bin/R CMD check --install=check:CellNOptR.install-out.txt --library=/home/biocbuild/bbs-3.11-bioc/R/library --no-vignettes --timings CellNOptR_1.34.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/home/biocbuild/bbs-3.11-bioc/meat/CellNOptR.Rcheck’
* using R version 4.0.3 (2020-10-10)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘CellNOptR/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘CellNOptR’ version ‘1.34.0’
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Depends: includes the non-default packages:
  'RBGL', 'graph', 'hash', 'RCurl', 'Rgraphviz', 'XML', 'ggplot2'
Adding so many packages to the search path is excessive and importing
selectively is preferable.
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘CellNOptR’ can be installed ... WARNING
Found the following significant warnings:
  simulatorT1.c:502:20: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
See ‘/home/biocbuild/bbs-3.11-bioc/meat/CellNOptR.Rcheck/00install.out’ for details.
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... WARNING
'::' or ':::' imports not declared from:
  ‘foreach’ ‘plyr’
'loadNamespace' or 'requireNamespace' call not declared from: ‘plyr’
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
build_sif_table_from_rule : rename_gates: no visible global function
  definition for ‘mutate_if’
build_sif_table_from_rule : rename_gates: no visible global function
  definition for ‘mutate’
build_sif_table_from_rule : rename_gates: no visible binding for global
  variable ‘node_in’
build_sif_table_from_rule : rename_gates: no visible binding for global
  variable ‘node_out’
build_sif_table_from_rule : simplify_gates: no visible global function
  definition for ‘filter’
build_sif_table_from_rule : simplify_gates: no visible global function
  definition for ‘mutate’
build_sif_table_from_rule : simplify_gates: no visible binding for
  global variable ‘node_in’
build_sif_table_from_rule : simplify_gates: no visible binding for
  global variable ‘node_out’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘setNames’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘mutate_if’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘filter’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘mutate’
build_sif_table_from_rule : interpret_sif_list: no visible binding for
  global variable ‘num_or’
build_sif_table_from_rule : interpret_sif_list: no visible binding for
  global variable ‘node_out’
build_sif_table_from_rule : interpret_sif_list: no visible binding for
  global variable ‘new_node_out’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘unnest’
build_sif_table_from_rule : interpret_sif_list: no visible binding for
  global variable ‘node_in’
build_sif_table_from_rule : interpret_sif_list: no visible binding for
  global variable ‘new_node_in’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘distinct’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘group_by’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘summarise’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘select’
build_sif_table_from_rule : interpret_sif_list: no visible binding for
  global variable ‘or_members’
build_sif_table_from_rule : interpret_sif_list: no visible global
  function definition for ‘ungroup’
build_sif_table_from_rule : write_sif: no visible global function
  definition for ‘mutate’
build_sif_table_from_rule : write_sif: no visible binding for global
  variable ‘node_in’
build_sif_table_from_rule : write_sif: no visible binding for global
  variable ‘node_out’
build_sif_table_from_rule : write_sif: no visible binding for global
  variable ‘sign1’
build_sif_table_from_rule : write_sif: no visible binding for global
  variable ‘sign2’
crossvalidateBoolean: no visible global function definition for ‘error’
crossvalidateBoolean: no visible global function definition for
  ‘%dopar%’
readBND: no visible global function definition for ‘read_file’
readBNET: no visible global function definition for ‘rowwise’
readBNET: no visible global function definition for ‘mutate’
readBNET: no visible binding for global variable ‘factors’
readBNET: no visible binding for global variable ‘i_and_gates’
readBNET: no visible global function definition for ‘do’
readBNET: no visible binding for global variable ‘.’
readBNET: no visible global function definition for ‘unnest’
readBNET: no visible global function definition for ‘ungroup’
Undefined global functions or variables:
  %dopar% . distinct do error factors filter group_by i_and_gates
  mutate mutate_if new_node_in new_node_out node_in node_out num_or
  or_members read_file rowwise select setNames sign1 sign2 summarise
  ungroup unnest
Consider adding
  importFrom("stats", "filter", "setNames")
to your NAMESPACE file.
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... WARNING
Undocumented data sets:
  ‘cnodata’ ‘pknmodel’
All user-level objects in a package should have documentation entries.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
* checking for code/documentation mismatches ... WARNING
Codoc mismatches from documentation object 'normaliseCNOlist':
normaliseCNOlist
  Code: function(CNOlist, EC50Data = 0.5, HillCoef = 2, EC50Noise = 0,
                 detection = 0, saturation = Inf, changeTh = 0,
                 norm2TorCtrl = NULL, mode = "time", options =
                 list(rescale_negative = TRUE), verbose = FALSE)
  Docs: function(CNOlist, EC50Data = 0.5, HillCoef = 2, EC50Noise = 0,
                 detection = 0, saturation = Inf, changeTh = 0,
                 norm2TorCtrl = NULL, mode = "time", options =
                 list(rescale_negative = T), verbose = FALSE)
  Mismatches in argument default values:
    Name: 'options' Code: list(rescale_negative = TRUE) Docs: list(rescale_negative = T)

* checking Rd \usage sections ... WARNING
Bad \usage lines found in documentation object 'createAndRunILP':
  createAndRunILP <- function(model = model, 
                              midas = midas, 
                              cnolist = cnolist, 
                              accountForModelSize = accountForModelSize, 
                              sizeFac = sizeFac, 
                              source_path = source_path, 
                              mipGap = mipGap, 
                              relGap = relGap, 
                              timelimit = timelimit,
                              cplexPath = cplexPath, 
                              method = method, 
                              numSolutions = numSolutions, 
                              limitPop = limitPop, 
                              poolIntensity = poolIntensity, 
                              poolReplace = poolReplace)
Bad \usage lines found in documentation object 'createILPBitstringAll':
  createILPBitstringAll<- function(cplexSolutionFileName,
                                   y_vector,
                                   binary_variables)
Bad \usage lines found in documentation object 'create_binaries':
  create_binaries <- function(model, 
                              midas, 
                              numberOfExperiments, 
                              y_vector)
Bad \usage lines found in documentation object 'crossvalidateBoolean':
  crossvalidateBoolean = function(CNOlist,model,nfolds=10,foldid=NULL, 
                                  type=c('datapoint','experiment','observable'),timeIndex = 2,parallel=FALSE, ...)
Bad \usage lines found in documentation object 'ilpBinaryT1':
  ilpBinaryT1 <- function(cnolist, 
                          model, 
                          sizeFac = 0.0001, 
                          mipGap = 0, 
                          relGap = 0, 
                          timelimit = 3600, 
                          cplexPath, 
                          method = "quadratic",
                          numSolutions = 100, 
                          limitPop = 500, 
                          poolIntensity = 4, 
                          poolReplace = 2)
Bad \usage lines found in documentation object 'ilpBinaryT2':
  ilpBinaryT2 <- function(cnolist, 
                          model, 
                          sizeFac = 0.0001, 
                          mipGap = 0, 
                          relGap = 0, 
                          timelimit = 3600, 
                          cplexPath, 
                          method = "quadratic",
                          numSolutions = 100, 
                          limitPop = 500, 
                          poolIntensity = 4, 
                          poolReplace = 2)
Bad \usage lines found in documentation object 'ilpBinaryTN':
  ilpBinaryTN <- function(cnolist, 
                          model, 
                          sizeFac = 0.0001, 
                          mipGap = 0, 
                          relGap = 0, 
                          timelimit = 3600, 
                          cplexPath, 
                          method = "quadratic",
                          numSolutions = 100, 
                          limitPop = 500, 
                          poolIntensity = 0, 
                          poolReplace = 2,
                          timeIndices = c(1, 2))
Bad \usage lines found in documentation object 'invokeCPLEX':
  invokeCPLEX <- function(inputFileName, 
                          outputFileName, 
                          mipGap=mipGap, 
                          relGap = relGap, 
                          timelimit=timelimit, 
                          cplexPath = cplexPath, 
                          numSolutions = numSolutions, 
                          limitPop = limitPop, 
                          poolIntensity = poolIntensity, 
                          poolReplace = poolReplace)
Bad \usage lines found in documentation object 'writeFile':
  writeFile <- function(objectiveFunction,
                        constraints,
                        bounds,
                        binaries,
                        cplexPath)
Bad \usage lines found in documentation object 'writeObjectiveFunction':
  writeObjectiveFunction <- function(model, 
                                     midasExperimentPart, 
                                     y_vector=y_vector,
                                     accountForModelSize = TRUE, 
                                     sizeFac = .000001, 
                                     meansOfMeasurements_at_t0, 
                                     method = "quadratic" )
Bad \usage lines found in documentation object 'write_bounds':
  write_bounds <- function(model,
                           midasTreatmentPart,
                           y_vector,
                           binary_variables)
Bad \usage lines found in documentation object 'write_constraints':
  write_constraints <- function(model,
                                midasExperimentPart,
                                midasTreatmentPart,
                                reaction_sets,
                                y_vector, 
                                midas, 
                                binary_variables)

Functions with \usage entries need to have the appropriate \alias
entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... NOTE
Note: information on .o files is not available
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
Examples with CPU (user + system) or elapsed time > 5s
                      user system elapsed
crossvalidateBoolean 5.425  0.148   5.582
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘test_gaBinaryT1.R’
  Running ‘test_gaBinaryT2.R’
  Running ‘test_gaBinaryT3.R’
  Running ‘test_import_rules.R’
  Running ‘test_manySteadyStates.R’
  Running ‘test_priorBitString.R’
  Running ‘test_simulateTN.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 5 WARNINGs, 3 NOTEs
See
  ‘/home/biocbuild/bbs-3.11-bioc/meat/CellNOptR.Rcheck/00check.log’
for details.



Installation output

CellNOptR.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.11-bioc/R/bin/R CMD INSTALL CellNOptR
###
##############################################################################
##############################################################################


* installing to library ‘/home/biocbuild/bbs-3.11-bioc/R/library’
* installing *source* package ‘CellNOptR’ ...
** using staged installation
** libs
gcc -I"/home/biocbuild/bbs-3.11-bioc/R/include" -DNDEBUG   -I/usr/local/include  -I./include  -fpic  -g -O2  -Wall -c getFit.c -o getFit.o
getFit.c: In function ‘getFit’:
getFit.c:47:6: warning: unused variable ‘nReacs’ [-Wunused-variable]
  int nReacs = INTEGER(nReacs_in)[0];
      ^~~~~~
getFit.c:42:6: warning: unused variable ‘selCounter’ [-Wunused-variable]
  int selCounter = 0;
      ^~~~~~~~~~
getFit.c:41:6: warning: unused variable ‘selection’ [-Wunused-variable]
  int selection[40];
      ^~~~~~~~~
getFit.c:40:6: warning: unused variable ‘or_max’ [-Wunused-variable]
  int or_max = 0;
      ^~~~~~
getFit.c:39:6: warning: unused variable ‘curr_max’ [-Wunused-variable]
  int curr_max = 0;
      ^~~~~~~~
gcc -I"/home/biocbuild/bbs-3.11-bioc/R/include" -DNDEBUG   -I/usr/local/include  -I./include  -fpic  -g -O2  -Wall -c simulatorT1.c -o simulatorT1.o
simulatorT1.c: In function ‘simulatorT1’:
simulatorT1.c:502:20: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
        if (MA[i][j]<0.95 & MA[i][j]>0.05)  // actually we could check if they are exatly 0 or 1
            ~~~~~~~~^~~~~
gcc -I"/home/biocbuild/bbs-3.11-bioc/R/include" -DNDEBUG   -I/usr/local/include  -I./include  -fpic  -g -O2  -Wall -c simulatorTN.c -o simulatorTN.o
gcc -shared -L/home/biocbuild/bbs-3.11-bioc/R/lib -L/usr/local/lib -o CellNOptR.so getFit.o simulatorT1.o simulatorTN.o -L/home/biocbuild/bbs-3.11-bioc/R/lib -lR
installing to /home/biocbuild/bbs-3.11-bioc/R/library/00LOCK-CellNOptR/00new/CellNOptR/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (CellNOptR)

Tests output

CellNOptR.Rcheck/tests/test_gaBinaryT1.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> #
> #  This file is part of the CNO software
> #
> #  Copyright (c) 2011-2012 - EBI
> #
> #  File author(s): CNO developers (cno-dev@ebi.ac.uk)
> #
> #  Distributed under the GPLv2 License.
> #  See accompanying file LICENSE.txt or copy at
> #      http://www.gnu.org/licenses/gpl-2.0.html
> #
> #  CNO website: http://www.ebi.ac.uk/saezrodriguez/cno
> #
> ##############################################################################
> # $Id$
> 
> # This is a test of the ToyModel and gaBinaryT1
> library(CellNOptR)
Loading required package: RBGL
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: RCurl
Loading required package: Rgraphviz
Loading required package: grid
Loading required package: XML

Attaching package: 'XML'

The following object is masked from 'package:graph':

    addNode

Loading required package: ggplot2
> 
> # read data
> pknmodel = readSIF(system.file("ToyModel/ToyPKNMMB.sif", package="CellNOptR"))
> data = readMIDAS(system.file("ToyModel/ToyDataMMB.csv", package="CellNOptR"))
[1] "Your data set comprises  18 conditions (i.e. combinations of time point and treatment)"
[1] "Your data set comprises measurements on  7  different species"
[1] "Your data set comprises  4 stimuli/inhibitors and 1 cell line(s) ( mock )"
[1] "Please be aware that CNO only handles measurements on one cell line at this time."
[1] "Your data file contained 'NaN'. We have assumed that these were missing values and replaced them by NAs."
> cnolist = makeCNOlist(data, subfield=FALSE)
[1] "Please be aware that if you only have some conditions at time zero (e.g.only inhibitor/no inhibitor), the measurements for these conditions will be copied across matching conditions at t=0"
> 
> # preprocessing
> model = preprocessing(cnolist, pknmodel, verbose=FALSE)
> 
> # optimisation
> T1opt<-gaBinaryT1(CNOlist=cnolist,model=model,verbose=FALSE)
> 
> truebs =c(1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0)
> print(truebs)
 [1] 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0
> print(T1opt$bString)
 [1] 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0
> 
> # testing valid output
> if (dist(rbind(T1opt$bString, truebs))>2){
+ stop("something wrong going on")
+ }
> 
> # extra call to simulateTN
> SimT1<-simulateTN(CNOlist=cnolist,model=model, bStrings=list(truebs))
> 
> 
> proc.time()
   user  system elapsed 
  4.586   0.129   4.699 

CellNOptR.Rcheck/tests/test_gaBinaryT2.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> #
> #  This file is part of the CNO software
> #
> #  Copyright (c) 2011-2012 - EBI
> #
> #  File author(s): CNO developers (cno-dev@ebi.ac.uk)
> #
> #  Distributed under the GPLv2 License.
> #  See accompanying file LICENSE.txt or copy at
> #      http://www.gnu.org/licenses/gpl-2.0.html
> #
> #  CNO website: http://www.ebi.ac.uk/saezrodriguez/cno
> #
> ##############################################################################
> # $Id$
> 
> # This is a test of the ToyModel and gaBinaryT1
> # 
> 
> library(CellNOptR)
Loading required package: RBGL
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: RCurl
Loading required package: Rgraphviz
Loading required package: grid
Loading required package: XML

Attaching package: 'XML'

The following object is masked from 'package:graph':

    addNode

Loading required package: ggplot2
> data(CNOlistToy2, package="CellNOptR")
> data(ToyModel2, package="CellNOptR")
> cnolist = CNOlistToy2
> pknmodel = ToyModel2
> 
> model = preprocessing(cnolist, pknmodel, verbose=FALSE)
> T1opt<-gaBinaryT1(CNOlist=cnolist,model=model,verbose=FALSE)
> print(T1opt$bString)
 [1] 1 1 1 1 1 0 1 1 0 0 1 1 1 1 0 0 0 0
> 
> truebs = c(1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0)
> 
> 
> T2opt<-gaBinaryTN(CNOlist=cnolist,model=model,bStrings=list(truebs),verbose=FALSE)
> truebs2 = c(0, 0, 0, 1, 0, 0, 0)
> 
> print(T2opt$bString)
[1] 0 0 0 1 0 0 0
> 
> proc.time()
   user  system elapsed 
  7.333   0.161   7.530 

CellNOptR.Rcheck/tests/test_gaBinaryT3.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> #
> #  This file is part of the CNO software
> #
> #  Copyright (c) 2011-2012 - EBI
> #
> #  File author(s): CNO developers (cno-dev@ebi.ac.uk)
> #
> #  Distributed under the GPLv2 License.
> #  See accompanying file LICENSE.txt or copy at
> #      http://www.gnu.org/licenses/gpl-2.0.html
> #
> #  CNO website: http://www.ebi.ac.uk/saezrodriguez/cno
> #
> ##############################################################################
> # $Id$
> 
> # This is a test of the ToyModel and gaBinaryT1
> # 
> 
> library(CellNOptR)
Loading required package: RBGL
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: RCurl
Loading required package: Rgraphviz
Loading required package: grid
Loading required package: XML

Attaching package: 'XML'

The following object is masked from 'package:graph':

    addNode

Loading required package: ggplot2
> 
> pknmodel = readSIF(system.file("ToyModelT3/ToyModelT3.sif", package="CellNOptR"))
> cnolist = CNOlist(system.file("ToyModelT3/ToyDataT3.csv", package="CellNOptR"))
> model = preprocessing(cnolist, pknmodel, verbose=FALSE)
> 
> # expected values
> bestBS = c(1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0,0)
> bestBS2 <- c(0,0,0,0,0,0,1)
> bestBS3 <- c(0,0,1,0,0,0)
> 
> # just to check that the simulateTN function works 
> SimT1<-simulateTN(CNOlist=cnolist, model=model, bString=list(bestBS))
> SimT2<-simulateTN(CNOlist=cnolist, model=model, bStrings=list(bestBS,bestBS2))
> SimT3<-simulateTN(CNOlist=cnolist, model=model, bStrings=list(bestBS, bestBS2, bestBS3))
> 
> 
> # again, just to check that gaBinary works
> # run T1 first, 
> T1opt<-gaBinaryT1(CNOlist=cnolist,model=model,verbose=FALSE)
> # run T2
> T2opt<-gaBinaryTN(CNOlist=cnolist,model=model,bStrings=list(T1opt$bString),verbose=FALSE)
> # run T3
> T3opt<-gaBinaryTN(CNOlist=cnolist,model=model,bStrings=list(bestBS, bestBS2),verbose=FALSE)
> 
> print( T1opt$bScore)
             
4.545455e-05 
> print( T2opt$bScore)
[1] 5.454545e-05
> print( T3opt$bScore)
[1] 6.363636e-05
> # no using the hardcoded parameters, we can check the output of te scores that
> # must be tiny.
> score1 = computeScoreT1(cnolist, model, bString=bestBS)
> score2 = computeScoreTN(cnolist, model, bStrings=list(bestBS,bestBS2))
> score3 = computeScoreTN(cnolist, model, bStrings=list(bestBS,bestBS2, bestBS3))
> 
> 
> print(score1)
[1] 4.545455e-05
> print(score2)
[1] 5.454545e-05
> print(score3)
[1] 6.363636e-05
> if (score1>0.01 || score2>0.24 || score3>0.1){
+    # ideally, the score should all be close to 0. In practice, it's about 1e-5
+    # However, in the  T3 case, once in while, the score is 0.0953 hence the
+    # score3>0.1
+    stop("errore")
+ }
> cutAndPlot(cnolist, model,bStrings=list(bestBS),plotPDF=TRUE, tag="test1")
$filenames
$filenames[[1]]
[1] "test1_SimResultsT1_1_.pdf"


$mse
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$simResults
$simResults[[1]]
$simResults[[1]]$t0
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$simResults[[1]]$t1
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    1
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    1
[6,]    1    0    0    1    1    1
[7,]    0    0    0    0    0    0



> cutAndPlot(cnolist, model,bStrings=list(bestBS,bestBS2),plotPDF=TRUE, tag="test2")
$mse
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$filenames
list()

$simResults
$simResults[[1]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$simResults[[2]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    1
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    1
[6,]    1    0    0    1    1    1
[7,]    0    0    0    0    0    0

$simResults[[3]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    0
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    0
[6,]    1    0    0    1    1    0
[7,]    0    0    0    0    0    0


> cutAndPlot(cnolist, model, bStrings=list(bestBS,bestBS2,bestBS3),plotPDF=TRUE, tag="test3")
$mse
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$filenames
list()

$simResults
$simResults[[1]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$simResults[[2]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    1
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    1
[6,]    1    0    0    1    1    1
[7,]    0    0    0    0    0    0

$simResults[[3]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    0
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    0
[6,]    1    0    0    1    1    0
[7,]    0    0    0    0    0    0

$simResults[[4]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    1    1    0    0    0
[2,]    0    0    0    1    0    1
[3,]    0    1    1    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    1    0    1
[6,]    0    0    0    1    0    1
[7,]    0    0    0    0    0    0


> 
> 
> 
> warnings()
> 
> proc.time()
   user  system elapsed 
  8.154   0.133   8.569 

CellNOptR.Rcheck/tests/test_import_rules.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(CellNOptR)
Loading required package: RBGL
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: RCurl
Loading required package: Rgraphviz
Loading required package: grid
Loading required package: XML

Attaching package: 'XML'

The following object is masked from 'package:graph':

    addNode

Loading required package: ggplot2
> 
> # test readBND ------------------------------------------------------------------
> 
> required_pcks = list("plyr","dplyr","tidyr","readr")
> 
> if(!all(unlist(lapply(required_pcks,requireNamespace)))){
+ 	print("the following packages need to be installed to use readBND:")	
+ 	print(unlist(required_pcks))
+ 	print("Please, install the packages manually for this feature.")
+ 
+ }else{
+ 	#download.file("https://maboss.curie.fr/pub/example.bnd",destfile = "./tests/example.bnd")
+ 	#model = readBND("./tests/example.bnd")
+ 	model = readBND("https://maboss.curie.fr/pub/example.bnd")
+ 	
+ 	# basic checks for being a CellNoptR model:
+ 	stopifnot(is.list(model))
+ 	stopifnot(length(model)==4)
+ 	stopifnot(all(names(model) %in% c("reacID","namesSpecies","interMat","notMat")))
+ 	stopifnot(length(model$reacID)==ncol(model$interMat))
+ 	stopifnot(length(model$reacID)==ncol(model$notMat))
+ 	stopifnot(length(model$namesSpecies)==nrow(model$interMat))
+ 	stopifnot(length(model$namesSpecies)==nrow(model$notMat))
+ 	
+ 	#plotModel(model)
+ 	
+ 	
+ 	
+ }
Loading required namespace: plyr
Loading required namespace: tidyr
Loading required namespace: readr
Loading required package: plyr

Attaching package: 'plyr'

The following object is masked from 'package:graph':

    join

Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:plyr':

    arrange, count, desc, failwith, id, mutate, rename, summarise,
    summarize

The following object is masked from 'package:graph':

    union

The following objects are masked from 'package:BiocGenerics':

    combine, intersect, setdiff, union

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: tidyr

Attaching package: 'tidyr'

The following object is masked from 'package:RCurl':

    complete

Loading required package: readr
Warning messages:
1: In readBND("https://maboss.curie.fr/pub/example.bnd") :
  experimental BND reader. Use with care (July 2018).
2: In readBNET(fh) :
  experimental BNET reader. Use with care (February 2018).
3: `cols` is now required when using unnest().
Please use `cols = c(sif_df)` 
> 
> 
> 
> proc.time()
   user  system elapsed 
  3.806   0.150   4.562 

CellNOptR.Rcheck/tests/test_manySteadyStates.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> #
> #  This file is part of the CNO software
> #
> #  Copyright (c) 2011-2012 - EBI
> #
> #  File author(s): CNO developers (cno-dev@ebi.ac.uk)
> #
> #  Distributed under the GPLv2 License.
> #  See accompanying file LICENSE.txt or copy at
> #      http://www.gnu.org/licenses/gpl-2.0.html
> #
> #  CNO website: http://www.ebi.ac.uk/saezrodriguez/software.html
> #
> ##############################################################################
> # $Id$
> 
> # This test runs optimisation using Boolean logic at different time points
> # Author: S.Schrier, T.Cokelaer
> 
> 
> 
> manySteadyStates <-function(
+   CNOlist,
+   model,
+   sizeFac=0.0001,
+   NAFac=1,
+   popSize=50,
+   pMutation=0.5,
+   maxTime=60,
+   maxGens=500,
+   stallGenMax=100,
+   selPress=1.2,
+   elitism=5,
+   relTol=0.1,
+   verbose=FALSE,
+   priorBitString=NULL){
+ 
+ 
+     #initialize Opt array
+     Opt<-list()    
+     #initialze a bString array  
+     bStrings<-list()
+     simRes<-list()
+ 
+ 
+     T1opt<-gaBinaryT1(CNOlist=CNOlist,
+                   model=model,
+                   stallGenMax=stallGenMax,
+                   sizeFac=sizeFac,
+                   NAFac=NAFac,
+                   popSize=popSize,
+                   pMutation=pMutation,
+                   maxTime=maxTime,
+                   maxGens=maxGens,
+                   selPress=selPress,
+                   elitism=elitism,
+                   relTol=relTol,
+                   verbose=verbose,
+                   priorBitString=priorBitString)
+ 
+     Opt[[1]]<-T1opt
+     simT1<-simulateTN(CNOlist=CNOlist, model=model, bStrings=list(T1opt$bString))
+     simRes[[1]]<-simT1
+     bStrings[[1]] = T1opt$bString
+ 
+     if (length(CNOlist@signals)>2){
+         for(i in 3:length(CNOlist@signals)){
+             Opt[[i-1]]<-gaBinaryTN(CNOlist=CNOlist,
+                         model=model,
+                         bStrings=bStrings,
+                         stallGenMax=stallGenMax,
+                         maxTime=maxTime,
+                         sizeFac=sizeFac,
+                         NAFac=NAFac,
+                         popSize=popSize,
+                         pMutation=pMutation,
+                         maxGens=maxGens,
+                         selPress=selPress,
+                         elitism=elitism,
+                         relTol=relTol,
+                         verbose=verbose,
+                         priorBitString=priorBitString)
+ 
+             bStrings[[i-1]] = Opt[[i-1]]$bString
+ 
+             simRes[[i]]<-simulateTN(CNOlist,model,bStrings)
+         }
+     }   
+     return(list(bStrings=bStrings, Opt=Opt, simRes=simRes))
+ }
> 
> 
> 
> library(CellNOptR)
Loading required package: RBGL
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: RCurl
Loading required package: Rgraphviz
Loading required package: grid
Loading required package: XML

Attaching package: 'XML'

The following object is masked from 'package:graph':

    addNode

Loading required package: ggplot2
> 
> # one steady state
> data(CNOlistToy, package="CellNOptR")
> cnolist = CNOlist(CNOlistToy)
> data(ToyModel, package="CellNOptR")
> results = manySteadyStates(cnolist, ToyModel)
> print(results$bStrings)
[[1]]
 [1] 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 0

> 
> # two steady state
> data(CNOlistToy2, package="CellNOptR")
> cnolist = CNOlist(CNOlistToy2)
> data(ToyModel2, package="CellNOptR")
> results = manySteadyStates(cnolist, ToyModel2)
> print(results$bStrings)
[[1]]
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0

[[2]]
[1] 0 0 1

> 
> # 3 steady state
> ToyModel3 = readSIF(system.file("ToyModelT3/ToyModelT3.sif", package="CellNOptR"))
> cnolist = CNOlist(system.file("ToyModelT3/ToyDataT3.csv", package="CellNOptR"))
> results = manySteadyStates(cnolist, ToyModel3)
> print(results$bStrings)
[[1]]
 [1] 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0

[[2]]
[1] 0 0 0

[[3]]
[1] 0 0 0

> 
> 
> 
> proc.time()
   user  system elapsed 
 11.763   0.143  11.950 

CellNOptR.Rcheck/tests/test_priorBitString.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> #
> #  This file is part of the CNO software
> #
> #  Copyright (c) 2011-2012 - EBI
> #
> #  File author(s): CNO developers (cno-dev@ebi.ac.uk)
> #
> #  Distributed under the GPLv2 License.
> #  See accompanying file LICENSE.txt or copy at
> #      http://www.gnu.org/licenses/gpl-2.0.html
> #
> #  CNO website: http://www.ebi.ac.uk/saezrodriguez/software.html
> #
> ##############################################################################
> # $Id$
> # test if the priorBitString is used correctly in gaBinaryT1DO NOT MODIFY please (TC, June 2012)
> 
> library(CellNOptR)
Loading required package: RBGL
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: RCurl
Loading required package: Rgraphviz
Loading required package: grid
Loading required package: XML

Attaching package: 'XML'

The following object is masked from 'package:graph':

    addNode

Loading required package: ggplot2
> 
> 
> # Load T1 and T2 data. Only T1 is used here below.
> data(ToyModel, package="CellNOptR")
> data(CNOlistToy, package="CellNOptR")
> cnolist = CNOlistToy
> pknmodel = ToyModel
> 
> # preprocessing
> model = preprocessing(cnolist, pknmodel)
[1] "The following species are measured: Akt, Hsp27, NFkB, Erk, p90RSK, Jnk, cJun"
[1] "The following species are stimulated: EGF, TNFa"
[1] "The following species are inhibited: Raf, PI3K"
[1] "The following species are not observable and/or not controllable: "
> 
> # computeScoreT1 with init string made of ones
> initBstring<-rep(1,length(model$reacID))
> 
> 
> 
> priorBitString = rep(NA, length(model$reacID))
> priorBitString[1] = 0
> priorBitString[2] = 0
> priorBitString[3] = 0
> priorBitString[4] = 0
> 
> # Second, you call the gaBinaryT1 function by providing the priorBitString
> # argument:
> ToyT1opt<-gaBinaryT1(CNOlist=CNOlistToy, model=model,
+     initBstring=initBstring, maxGens=10, popSize=5,
+     verbose=FALSE, priorBitString=priorBitString)
> 
> 
> for (x in ToyT1opt$results[,7]){
+      x = strsplit(x ,",")[[1]]
+      if (as.numeric(x[[1]]) != 0 ){ stop("first element must be 0")}
+      if (as.numeric(x[[2]]) != 0 ){ stop("second element must be 0")}
+      if (as.numeric(x[[3]]) != 0 ){ stop("tirdh element must be 0")}
+      if (as.numeric(x[[4]]) != 0 ){ stop("fourth element must be 0")}
+ }
> 
> 
> 
> proc.time()
   user  system elapsed 
  1.860   0.092   2.000 

CellNOptR.Rcheck/tests/test_simulateTN.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> #
> #  This file is part of the CNO software
> #
> #  Copyright (c) 2011-2012 - EBI
> #
> #  File author(s): CNO developers (cno-dev@ebi.ac.uk)
> #
> #  Distributed under the GPLv2 License.
> #  See accompanying file LICENSE.txt or copy at
> #      http://www.gnu.org/licenses/gpl-2.0.html
> #
> #  CNO website: http://www.ebi.ac.uk/saezrodriguez/software.html
> #
> ##############################################################################
> # $Id$
> # This test runs T3 data set to compute the scores (must be zero), and run
> # cutAndPlot plot on each time points.
> 
> # DO NOT MODIFY please (TC, June 2012)
> 
> library(CellNOptR)
Loading required package: RBGL
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: RCurl
Loading required package: Rgraphviz
Loading required package: grid
Loading required package: XML

Attaching package: 'XML'

The following object is masked from 'package:graph':

    addNode

Loading required package: ggplot2
> pknmodel = readSIF(system.file("ToyModelT3/ToyModelT3.sif", package="CellNOptR"))
> cnolist = CNOlist(system.file("ToyModelT3/ToyDataT3.csv",  package="CellNOptR"))
> 
> model = preprocessing(cnolist, pknmodel)
[1] "The following species are measured: AKT, MEK, ERK, P38, JNK, NFKB"
[1] "The following species are stimulated: TGFa, TNFa"
[1] "The following species are inhibited: PI3K, MEK"
[1] "The following species are not observable and/or not controllable: "
> 
> # computeScoreT1 with init string made of ones
> verbose = FALSE
> initBstring<-rep(1,length(model$reacID))
> score = computeScoreT1(cnolist, model,bString=rep(1,length(model$reacID)))
> bestBS = c(1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0,0)
> bestBS2 <- c(0,0,0,0,0,0,1) # given by running gaBinaryTN
> bestBS3 <- c(0,0,1,0,0,0) # given by running gaBinaryTN
> 
> 
> SimT1<-simulateTN(CNOlist=cnolist, model=model, bString=list(bestBS))
> SimT2<-simulateTN(CNOlist=cnolist, model=model, bStrings=list(bestBS, bestBS2))
> SimT3<-simulateTN(CNOlist=cnolist, model=model, bStrings=list(bestBS, bestBS2, bestBS3))
> 
> score1 = computeScoreT1(cnolist, model, bString=bestBS)
> score2 = computeScoreTN(cnolist, model, bStrings=list(bestBS,bestBS2))
> score3 = computeScoreTN(cnolist, model, bStrings=list(bestBS,bestBS2, bestBS3))
> 
> print(score1)
[1] 4.545455e-05
> print(score2)
[1] 5.454545e-05
> print(score3)
[1] 6.363636e-05
> if (score1>0.01 || score2>0.024){
+    stop("errore")
+ }
> cutAndPlot(cnolist, model,bStrings=list(bestBS),plotPDF=TRUE, tag="test1")
$filenames
$filenames[[1]]
[1] "test1_SimResultsT1_1_.pdf"


$mse
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$simResults
$simResults[[1]]
$simResults[[1]]$t0
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$simResults[[1]]$t1
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    1
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    1
[6,]    1    0    0    1    1    1
[7,]    0    0    0    0    0    0



> cutAndPlot(cnolist, model,bStrings=list(bestBS,bestBS2),plotPDF=TRUE, tag="test2")
$mse
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$filenames
list()

$simResults
$simResults[[1]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$simResults[[2]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    1
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    1
[6,]    1    0    0    1    1    1
[7,]    0    0    0    0    0    0

$simResults[[3]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    0
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    0
[6,]    1    0    0    1    1    0
[7,]    0    0    0    0    0    0


> cutAndPlot(cnolist, model, bStrings=list(bestBS,bestBS2,bestBS3),plotPDF=TRUE, tag="test3")
$mse
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$filenames
list()

$simResults
$simResults[[1]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0

$simResults[[2]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    1
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    1
[6,]    1    0    0    1    1    1
[7,]    0    0    0    0    0    0

$simResults[[3]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    0    1    0
[2,]    1    1    1    1    1    0
[3,]    0    1    1    0    0    0
[4,]    1    0    0    0    1    0
[5,]    0    0    0    1    0    0
[6,]    1    0    0    1    1    0
[7,]    0    0    0    0    0    0

$simResults[[4]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    1    1    0    0    0
[2,]    0    0    0    1    0    1
[3,]    0    1    1    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    1    0    1
[6,]    0    0    0    1    0    1
[7,]    0    0    0    0    0    0


> 
> 
> proc.time()
   user  system elapsed 
  2.568   0.126   2.703 

Example timings

CellNOptR.Rcheck/CellNOptR-Ex.timings

nameusersystemelapsed
CNORbool2.2580.0042.274
CNORwrap1.1180.0201.153
CNOdata000
CNOlist-class0.1420.0010.142
CNOlist-methods0.1060.0000.106
CellNOptR-package4.7280.0074.736
buildBitString0.0010.0000.000
build_sif_table_from_rule2.4260.0082.434
checkSignals0.0060.0000.006
compressModel0.0070.0000.008
computeScoreT10.0170.0030.021
computeScoreTN0.0380.0000.038
crossInhibitedData0.0060.0000.005
crossvalidateBoolean5.4250.1485.582
cutAndPlot0.3340.0080.342
cutAndPlotResultsT10.4130.0040.417
cutAndPlotResultsTN0.5980.0040.602
cutNONC0.010.000.01
defaultParameters0.0050.0000.005
exhaustive0.5020.0080.510
expandGates0.0110.0000.011
findNONC0.0060.0000.006
gaBinaryT10.2850.0000.285
gaBinaryT20.1410.0000.141
gaBinaryTN0.1550.0000.155
getFit0.0070.0000.007
ilpBinaryT10.2140.0000.214
ilpBinaryT20.2080.0000.208
ilpBinaryTN0.1720.0000.172
indexFinder0.0030.0000.003
makeCNOlist0.0220.0000.023
normaliseCNOlist0.0050.0000.005
plot-methods0.0700.0080.079
plotCNOlist0.0790.0000.080
plotCNOlist22.0670.0202.088
plotCNOlistLarge0.1650.0000.165
plotCNOlistLargePDF0.1720.0000.172
plotCNOlistPDF0.0690.0000.068
plotFit0.0590.0000.058
plotModel0.5410.0000.542
plotOptimResults0.1530.0000.153
plotOptimResultsPDF0.1350.0000.136
plotOptimResultsPan0.3100.0000.309
prep4sim0.0030.0000.004
preprocessing0.0110.0000.010
randomizeCNOlist0.0020.0000.002
readMIDAS0.0180.0040.022
readSBMLQual0.0010.0000.000
readSIF0.0050.0000.006
residualError0.0040.0000.003
simulateT10.0120.0000.011
simulateTN0.0090.0000.009
simulatorT00.0050.0040.009
simulatorT10.0090.0000.009
simulatorT20.0140.0000.013
simulatorTN0.0070.0000.008
writeDot0.0530.0080.061
writeMIDAS0.0190.0000.018
writeNetwork0.0590.0040.063
writeReport0.0300.0040.035
writeSIF0.0070.0000.007
writeScaffold0.0570.0000.056