From ee01d6c8956385fc63c7a6dbde14937591d602ed Mon Sep 17 00:00:00 2001 From: antagomir Date: Tue, 24 Mar 2015 11:58:54 +0100 Subject: [PATCH 1/8] Fixed all warnings that I could see with build/check script --- .Rbuildignore | 0 DESCRIPTION | 6 ++--- NAMESPACE | 2 +- R/AllClasses.R | 0 R/AllGenerics.R | 0 R/NetResponseModel-accessors.R | 2 +- R/detect.responses.R | 0 R/firstlib.R | 4 +-- R/internals.R | 0 R/model.stats.R | 0 R/order.responses.R | 0 R/plot-methods.R | 0 R/response2sample.R | 0 R/sample2response.R | 0 R/show-methods.R | 0 R/vdp.mixt.R | 0 data/toydata.rda | Bin inst/CITATION | 0 inst/extras/build.sh | 6 ++--- inst/extras/document.R | 29 +++++++++++++++++++++ man/ICMg.combined.sampler.Rd | 3 ++- man/ICMg.get.comp.memberships.Rd | 3 ++- man/ICMg.links.sampler.Rd | 3 ++- man/P.S.Rd | 3 ++- man/P.Sr.Rd | 3 ++- man/P.r.s.Rd | 3 ++- man/P.rS.Rd | 3 ++- man/P.rs.joint.Rd | 3 ++- man/P.rs.joint.individual.Rd | 3 ++- man/P.s.individual.Rd | 3 ++- man/P.s.r.Rd | 3 ++- man/PlotMixture.Rd | 3 ++- man/PlotMixtureBivariate.Rd | 3 ++- man/PlotMixtureMultivariate.Rd | 3 ++- man/PlotMixtureMultivariate.deprecated.Rd | 3 ++- man/PlotMixtureUnivariate.Rd | 3 ++- man/add.ellipse.Rd | 3 ++- man/bic.mixture.Rd | 3 ++- man/bic.mixture.multivariate.Rd | 3 ++- man/bic.mixture.univariate.Rd | 3 ++- man/bic.select.best.mode.Rd | 3 ++- man/centerData.Rd | 3 ++- man/check.matrix.Rd | 3 ++- man/check.network.Rd | 3 ++- man/continuous.responses.Rd | 3 ++- man/detect.responses.Rd | 3 ++- man/dna.Rd | 3 ++- man/enrichment.list.factor.Rd | 3 ++- man/enrichment.list.factor.minimal.Rd | 3 ++- man/factor.responses.Rd | 3 ++- man/factor.responses.minimal.Rd | 3 ++- man/filter.netw.Rd | 3 ++- man/filter.network.Rd | 3 ++- man/find.similar.features.Rd | 3 ++- man/generate.toydata.Rd | 3 ++- man/get.mis.Rd | 3 ++- man/get.model.parameters.Rd | 3 ++- man/get.subnets-NetResponseModel-method.Rd | 3 ++- man/getqofz-NetResponseModel-method.Rd | 3 ++- man/independent.models.Rd | 3 ++- man/list.responses.continuous.multi.Rd | 3 ++- man/list.responses.continuous.single.Rd | 3 ++- man/list.responses.factor.Rd | 3 ++- man/list.responses.factor.minimal.Rd | 3 ++- man/list.significant.responses.Rd | 3 ++- man/listify.groupings.Rd | 3 ++- man/mixture.model.Rd | 3 ++- man/model.stats.Rd | 3 ++- man/netresponse-package.Rd | 3 ++- man/order.responses.Rd | 3 ++- man/osmo.Rd | 3 ++- man/pick.model.pairs.Rd | 3 ++- man/pick.model.parameters.Rd | 3 ++- man/plot.data.Rd | 3 ++- man/plot.expression.Rd | 3 ++- man/plot.response.Rd | 3 ++- man/plot.responses.Rd | 3 ++- man/plot.scale.Rd | 3 ++- man/plot.subnet.Rd | 3 ++- man/plotPCA.Rd | 3 ++- man/plot_associations.Rd | 3 ++- man/plot_matrix.Rd | 3 ++- man/read.sif.Rd | 3 ++- man/remove.negative.edges.Rd | 3 ++- man/response.enrichment.Rd | 3 ++- man/response2sample.Rd | 3 ++- man/sample2response.Rd | 3 ++- man/set.breaks.Rd | 3 ++- man/toydata.Rd | 3 ++- man/update.model.pair.Rd | 3 ++- man/vdp.mixt.Rd | 3 ++- man/vectorize.groupings.Rd | 3 ++- man/write.netresponse.results.Rd | 3 ++- src/Makevars | 0 src/netresponse.c | 0 tests/vdpmixture.R | 0 96 files changed, 184 insertions(+), 84 deletions(-) mode change 100755 => 100644 .Rbuildignore mode change 100755 => 100644 DESCRIPTION mode change 100755 => 100644 NAMESPACE mode change 100755 => 100644 R/AllClasses.R mode change 100755 => 100644 R/AllGenerics.R mode change 100755 => 100644 R/NetResponseModel-accessors.R mode change 100755 => 100644 R/detect.responses.R mode change 100755 => 100644 R/firstlib.R mode change 100755 => 100644 R/internals.R mode change 100755 => 100644 R/model.stats.R mode change 100755 => 100644 R/order.responses.R mode change 100755 => 100644 R/plot-methods.R mode change 100755 => 100644 R/response2sample.R mode change 100755 => 100644 R/sample2response.R mode change 100755 => 100644 R/show-methods.R mode change 100755 => 100644 R/vdp.mixt.R mode change 100755 => 100644 data/toydata.rda mode change 100755 => 100644 inst/CITATION mode change 100755 => 100644 src/Makevars mode change 100755 => 100644 src/netresponse.c mode change 100755 => 100644 tests/vdpmixture.R diff --git a/.Rbuildignore b/.Rbuildignore old mode 100755 new mode 100644 diff --git a/DESCRIPTION b/DESCRIPTION old mode 100755 new mode 100644 index deb904e..a99f945 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: netresponse Type: Package Title: netresponse: functional network analysis -Version: 1.17.13 -Date: 2014-11-05 +Version: 1.17.15 +Date: 2015-03-24 Author: Leo Lahti, Olli-Pekka Huovilainen, Antonio Gusmao and Juuso Parkkinen Maintainer: Leo Lahti Description: Algorithms for functional network analysis. Includes an @@ -21,14 +21,12 @@ Imports: ggplot2, graph, igraph, - methods, parallel, plyr, qvalue, RColorBrewer URL: https://github.com/antagomir/netresponse BugReports: https://github.com/antagomir/netresponse/issues -LazyLoad: yes biocViews: CellBiology, Clustering, GeneExpression, Genetics, Network, GraphAndNetwork, DifferentialExpression, Microarray, Transcription diff --git a/NAMESPACE b/NAMESPACE old mode 100755 new mode 100644 index f876c12..41449be --- a/NAMESPACE +++ b/NAMESPACE @@ -1,4 +1,4 @@ -# Generated by roxygen2 (4.0.2): do not edit by hand +# Generated by roxygen2 (4.1.0): do not edit by hand export(ICMg.combined.sampler) export(ICMg.get.comp.memberships) diff --git a/R/AllClasses.R b/R/AllClasses.R old mode 100755 new mode 100644 diff --git a/R/AllGenerics.R b/R/AllGenerics.R old mode 100755 new mode 100644 diff --git a/R/NetResponseModel-accessors.R b/R/NetResponseModel-accessors.R old mode 100755 new mode 100644 index 081b32f..db747e6 --- a/R/NetResponseModel-accessors.R +++ b/R/NetResponseModel-accessors.R @@ -225,7 +225,7 @@ setMethod("getqofz", "NetResponseModel", function (model, subnet.id, log = FALSE #' @examples #' ## Load a pre-calculated netresponse model obtained with #' # model <- detect.responses(toydata$emat, toydata$netw, verbose = FALSE) -#' # data( toydata ); get.subnets(toydata$model) +#' # data( toydata ); get.dat(toydata$model) setMethod("get.dat", "NetResponseModel", function (model, subnet.id, sample = NULL) { # usage get.dat(model, subnet.id, sample = NULL) diff --git a/R/detect.responses.R b/R/detect.responses.R old mode 100755 new mode 100644 diff --git a/R/firstlib.R b/R/firstlib.R old mode 100755 new mode 100644 index 41bb8b5..5ad8eec --- a/R/firstlib.R +++ b/R/firstlib.R @@ -3,7 +3,6 @@ #' @import parallel #' @import RColorBrewer #' @import Rgraphviz -#' @import methods #' @importFrom igraph igraph.to.graphNEL #' @importFrom igraph igraph.from.graphNEL #' @importFrom igraph subgraph @@ -11,6 +10,7 @@ #' @importFrom igraph graph.edgelist #' @import qvalue #' @import mclust +#' @import methods #' @importFrom plyr ddply #' @importFrom minet build.mim #' @importFrom reshape melt @@ -34,5 +34,5 @@ .onAttach <- function(lib, pkg) { - packageStartupMessage('\nnetresponse Copyright (C) 2008-2014 Leo Lahti et al..\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under GNU GPL >=2, see the licensing terms for details.\n') + packageStartupMessage('\nnetresponse (C) 2008-2015 Leo Lahti et al.\n\nhttps://github.com/antagomir/netresponse') } diff --git a/R/internals.R b/R/internals.R old mode 100755 new mode 100644 diff --git a/R/model.stats.R b/R/model.stats.R old mode 100755 new mode 100644 diff --git a/R/order.responses.R b/R/order.responses.R old mode 100755 new mode 100644 diff --git a/R/plot-methods.R b/R/plot-methods.R old mode 100755 new mode 100644 diff --git a/R/response2sample.R b/R/response2sample.R old mode 100755 new mode 100644 diff --git a/R/sample2response.R b/R/sample2response.R old mode 100755 new mode 100644 diff --git a/R/show-methods.R b/R/show-methods.R old mode 100755 new mode 100644 diff --git a/R/vdp.mixt.R b/R/vdp.mixt.R old mode 100755 new mode 100644 diff --git a/data/toydata.rda b/data/toydata.rda old mode 100755 new mode 100644 diff --git a/inst/CITATION b/inst/CITATION old mode 100755 new mode 100644 diff --git a/inst/extras/build.sh b/inst/extras/build.sh index 246148c..0dc14c0 100755 --- a/inst/extras/build.sh +++ b/inst/extras/build.sh @@ -1,5 +1,5 @@ -/usr/bin/R CMD BATCH document.R +#/usr/bin/R CMD BATCH document.R /usr/bin/R CMD build ../../ -/usr/bin/R CMD check netresponse_1.17.13.tar.gz -/usr/bin/R CMD INSTALL netresponse_1.17.13.tar.gz +/usr/bin/R CMD check netresponse_1.17.15.tar.gz +/usr/bin/R CMD INSTALL netresponse_1.17.15.tar.gz #/usr/bin/R CMD BiocCheck netresponse_1.17.13.tar.gz diff --git a/inst/extras/document.R b/inst/extras/document.R index f3b87df..38e9229 100644 --- a/inst/extras/document.R +++ b/inst/extras/document.R @@ -1,2 +1,31 @@ +# Package release instructions: http://r-pkgs.had.co.nz/release.html + +# Documentation, Build and Check library(devtools) document("../../") +build("../../") +check("../../") + +# Submissions: +# +# release() # Submit to CRAN +# submit_cran() # Submit to CRAN without all release() questions + +# Utilities: +# +# build_win("../../") # Windows check +# revdep_check("../../") +# add_rstudio_project("../../") +# use_build_ignore("../NEWS.md", pkg = "../../") # NEWS.md not supported by CRAN +# use_package("dplyr") # add package to imports +# load_all(".") # Reload the package +# test() # Run tests +# run_examples() + +# Vignettes: +# +# library(knitr) +# knit("../../vignettes/eurostat_tutorial.Rmd", "../../vignettes/eurostat_tutorial.md") + + + diff --git a/man/ICMg.combined.sampler.Rd b/man/ICMg.combined.sampler.Rd index af0e4d1..1592d5a 100644 --- a/man/ICMg.combined.sampler.Rd +++ b/man/ICMg.combined.sampler.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/ICMg.R \name{ICMg.combined.sampler} \alias{ICMg.combined.sampler} \title{ICMg.combined.sampler} diff --git a/man/ICMg.get.comp.memberships.Rd b/man/ICMg.get.comp.memberships.Rd index c3adf65..d3b91cb 100644 --- a/man/ICMg.get.comp.memberships.Rd +++ b/man/ICMg.get.comp.memberships.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/ICMg.R \name{ICMg.get.comp.memberships} \alias{ICMg.get.comp.memberships} \title{ICMg.get.comp.memberships} diff --git a/man/ICMg.links.sampler.Rd b/man/ICMg.links.sampler.Rd index 4961b4a..d3d9f75 100644 --- a/man/ICMg.links.sampler.Rd +++ b/man/ICMg.links.sampler.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/ICMg.R \name{ICMg.links.sampler} \alias{ICMg.links.sampler} \title{ICMg.links.sampler} diff --git a/man/P.S.Rd b/man/P.S.Rd index 9cacf58..3eedec4 100644 --- a/man/P.S.Rd +++ b/man/P.S.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixture.densities.R \name{P.S} \alias{P.S} \title{Description: Probabiity density for sample diff --git a/man/P.Sr.Rd b/man/P.Sr.Rd index a01f524..1cc5acf 100644 --- a/man/P.Sr.Rd +++ b/man/P.Sr.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixture.densities.R \name{P.Sr} \alias{P.Sr} \title{Description: Probabiity density for sample group given mode diff --git a/man/P.r.s.Rd b/man/P.r.s.Rd index 3830953..968f3d9 100644 --- a/man/P.r.s.Rd +++ b/man/P.r.s.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixture.densities.R \name{P.r.s} \alias{P.r.s} \title{Description: Probabiity of mode given a sample (a data vector) diff --git a/man/P.rS.Rd b/man/P.rS.Rd index e2b0460..15094c3 100644 --- a/man/P.rS.Rd +++ b/man/P.rS.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixture.densities.R \name{P.rS} \alias{P.rS} \title{Description: Probabiity of mode given multiple samples (ie. data matrix) diff --git a/man/P.rs.joint.Rd b/man/P.rs.joint.Rd index 8ea9265..f80ee80 100644 --- a/man/P.rs.joint.Rd +++ b/man/P.rs.joint.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixture.densities.R \name{P.rs.joint} \alias{P.rs.joint} \title{Description: Joint probabiity density for mode and sample group diff --git a/man/P.rs.joint.individual.Rd b/man/P.rs.joint.individual.Rd index 234e859..fd2929a 100644 --- a/man/P.rs.joint.individual.Rd +++ b/man/P.rs.joint.individual.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixture.densities.R \name{P.rs.joint.individual} \alias{P.rs.joint.individual} \title{Description: Joint probabiity density for mode and sample diff --git a/man/P.s.individual.Rd b/man/P.s.individual.Rd index f6ff221..c5afabc 100644 --- a/man/P.s.individual.Rd +++ b/man/P.s.individual.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixture.densities.R \name{P.s.individual} \alias{P.s.individual} \title{Description: Probabiity density for individual sample diff --git a/man/P.s.r.Rd b/man/P.s.r.Rd index 80355fe..39d8c5e 100644 --- a/man/P.s.r.Rd +++ b/man/P.s.r.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixture.densities.R \name{P.s.r} \alias{P.s.r} \title{Description: Probabiity density for sample given mode diff --git a/man/PlotMixture.Rd b/man/PlotMixture.Rd index ba7232b..a05d8c3 100644 --- a/man/PlotMixture.Rd +++ b/man/PlotMixture.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/PlotMixture.R \name{PlotMixture} \alias{PlotMixture} \title{PlotMixture} diff --git a/man/PlotMixtureBivariate.Rd b/man/PlotMixtureBivariate.Rd index c603afb..3e5aa70 100644 --- a/man/PlotMixtureBivariate.Rd +++ b/man/PlotMixtureBivariate.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{PlotMixtureBivariate} \alias{PlotMixtureBivariate} \title{PlotMixtureBivariate} diff --git a/man/PlotMixtureMultivariate.Rd b/man/PlotMixtureMultivariate.Rd index 47dc236..4d0440f 100644 --- a/man/PlotMixtureMultivariate.Rd +++ b/man/PlotMixtureMultivariate.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{PlotMixtureMultivariate} \alias{PlotMixtureMultivariate} \title{PlotMixtureMultivariate} diff --git a/man/PlotMixtureMultivariate.deprecated.Rd b/man/PlotMixtureMultivariate.deprecated.Rd index 227f127..763f7f3 100644 --- a/man/PlotMixtureMultivariate.deprecated.Rd +++ b/man/PlotMixtureMultivariate.deprecated.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/deprecated.R \name{PlotMixtureMultivariate.deprecated} \alias{PlotMixtureMultivariate.deprecated} \title{PlotMixtureMultivariate.deprecated} diff --git a/man/PlotMixtureUnivariate.Rd b/man/PlotMixtureUnivariate.Rd index a0108ee..9874ba9 100644 --- a/man/PlotMixtureUnivariate.Rd +++ b/man/PlotMixtureUnivariate.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/PlotMixtureUnivariate.R \name{PlotMixtureUnivariate} \alias{PlotMixtureUnivariate} \title{PlotMixtureUnivariate} diff --git a/man/add.ellipse.Rd b/man/add.ellipse.Rd index 90dfbc4..4aa0842 100644 --- a/man/add.ellipse.Rd +++ b/man/add.ellipse.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/visualization.R \name{add.ellipse} \alias{add.ellipse} \title{Add ellipse to an existing plot.} diff --git a/man/bic.mixture.Rd b/man/bic.mixture.Rd index 988eaa2..a1e7f4b 100644 --- a/man/bic.mixture.Rd +++ b/man/bic.mixture.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixtures.R \name{bic.mixture} \alias{bic.mixture} \title{Description: Latent class analysis based on (infinite) Gaussian mixture model. diff --git a/man/bic.mixture.multivariate.Rd b/man/bic.mixture.multivariate.Rd index e5d9612..a3f328b 100644 --- a/man/bic.mixture.multivariate.Rd +++ b/man/bic.mixture.multivariate.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixtures.R \name{bic.mixture.multivariate} \alias{bic.mixture.multivariate} \title{Description: Latent class analysis based on (infinite) Gaussian mixture model. diff --git a/man/bic.mixture.univariate.Rd b/man/bic.mixture.univariate.Rd index 9ccee9d..ce77e15 100644 --- a/man/bic.mixture.univariate.Rd +++ b/man/bic.mixture.univariate.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixtures.R \name{bic.mixture.univariate} \alias{bic.mixture.univariate} \title{Description: Latent class analysis based on (infinite) Gaussian mixture diff --git a/man/bic.select.best.mode.Rd b/man/bic.select.best.mode.Rd index 0800035..683bc35 100644 --- a/man/bic.select.best.mode.Rd +++ b/man/bic.select.best.mode.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixtures.R \name{bic.select.best.mode} \alias{bic.select.best.mode} \title{Description: Select optimal number of mixture components by adding components until diff --git a/man/centerData.Rd b/man/centerData.Rd index dfa4dbd..e556980 100644 --- a/man/centerData.Rd +++ b/man/centerData.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/utilities.R \name{centerData} \alias{centerData} \title{Center data matrix.} diff --git a/man/check.matrix.Rd b/man/check.matrix.Rd index 0bbe291..e7bf04a 100644 --- a/man/check.matrix.Rd +++ b/man/check.matrix.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/check.matrix.R \name{check.matrix} \alias{check.matrix} \title{check.matrix} diff --git a/man/check.network.Rd b/man/check.network.Rd index 182cfca..ef6dde7 100644 --- a/man/check.network.Rd +++ b/man/check.network.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/check.network.R \name{check.network} \alias{check.network} \title{check.network} diff --git a/man/continuous.responses.Rd b/man/continuous.responses.Rd index 96f3cd9..aa3c6c5 100644 --- a/man/continuous.responses.Rd +++ b/man/continuous.responses.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/continuous.responses.R \name{continuous.responses} \alias{continuous.responses} \title{Description: Quantify association between modes and continuous variable} diff --git a/man/detect.responses.Rd b/man/detect.responses.Rd index 54df95c..3d58e21 100644 --- a/man/detect.responses.Rd +++ b/man/detect.responses.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/detect.responses.R \name{detect.responses} \alias{detect.responses} \title{detect.responses} diff --git a/man/dna.Rd b/man/dna.Rd index f65306d..83012bd 100644 --- a/man/dna.Rd +++ b/man/dna.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/pkg-package.R \docType{data} \name{dna} \alias{dna} diff --git a/man/enrichment.list.factor.Rd b/man/enrichment.list.factor.Rd index 9dde8d4..9878a44 100644 --- a/man/enrichment.list.factor.Rd +++ b/man/enrichment.list.factor.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/enrichment.list.factor.R \name{enrichment.list.factor} \alias{enrichment.list.factor} \title{Description: enrichment.list.factor} diff --git a/man/enrichment.list.factor.minimal.Rd b/man/enrichment.list.factor.minimal.Rd index fbec7d3..884620a 100644 --- a/man/enrichment.list.factor.minimal.Rd +++ b/man/enrichment.list.factor.minimal.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/enrichment.list.factor.minimal.R \name{enrichment.list.factor.minimal} \alias{enrichment.list.factor.minimal} \title{Description: enrichment.list.factor} diff --git a/man/factor.responses.Rd b/man/factor.responses.Rd index 8e4abd9..4d039e4 100644 --- a/man/factor.responses.Rd +++ b/man/factor.responses.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/factor.responses.R \name{factor.responses} \alias{factor.responses} \title{Description: List responses for each level of the given factor} diff --git a/man/factor.responses.minimal.Rd b/man/factor.responses.minimal.Rd index 904ad7f..eda880c 100644 --- a/man/factor.responses.minimal.Rd +++ b/man/factor.responses.minimal.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/factor.responses.minimal.R \name{factor.responses.minimal} \alias{factor.responses.minimal} \title{Description: List responses for each level of the given factor} diff --git a/man/filter.netw.Rd b/man/filter.netw.Rd index b6fb6bb..e275c81 100644 --- a/man/filter.netw.Rd +++ b/man/filter.netw.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/filter.netw.R \name{filter.netw} \alias{filter.netw} \title{filter.netw} diff --git a/man/filter.network.Rd b/man/filter.network.Rd index 597cdd8..4a4bd32 100644 --- a/man/filter.network.Rd +++ b/man/filter.network.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/filter.netw.R \name{filter.network} \alias{filter.network} \title{filter.network} diff --git a/man/find.similar.features.Rd b/man/find.similar.features.Rd index bba2e34..e47bd86 100644 --- a/man/find.similar.features.Rd +++ b/man/find.similar.features.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/utilities.R \name{find.similar.features} \alias{find.similar.features} \title{Find similar features with a given subnetwork.} diff --git a/man/generate.toydata.Rd b/man/generate.toydata.Rd index 521b396..f23d31b 100644 --- a/man/generate.toydata.Rd +++ b/man/generate.toydata.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/toydata.R \name{generate.toydata} \alias{generate.toydata} \title{generate.toydata} diff --git a/man/get.mis.Rd b/man/get.mis.Rd index ceb6fb5..f1d4f23 100644 --- a/man/get.mis.Rd +++ b/man/get.mis.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/get.mis.R \name{get.mis} \alias{get.mis} \title{get.mis} diff --git a/man/get.model.parameters.Rd b/man/get.model.parameters.Rd index 2482cda..7c81949 100644 --- a/man/get.model.parameters.Rd +++ b/man/get.model.parameters.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/utilities.R \name{get.model.parameters} \alias{get.model.parameters} \title{get.model.parameters} diff --git a/man/get.subnets-NetResponseModel-method.Rd b/man/get.subnets-NetResponseModel-method.Rd index f282b3f..ccdcde1 100644 --- a/man/get.subnets-NetResponseModel-method.Rd +++ b/man/get.subnets-NetResponseModel-method.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/NetResponseModel-accessors.R \docType{methods} \name{get.subnets,NetResponseModel-method} \alias{get.subnets} diff --git a/man/getqofz-NetResponseModel-method.Rd b/man/getqofz-NetResponseModel-method.Rd index 02eef8b..410bc18 100644 --- a/man/getqofz-NetResponseModel-method.Rd +++ b/man/getqofz-NetResponseModel-method.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/NetResponseModel-accessors.R \docType{methods} \name{getqofz,NetResponseModel-method} \alias{getqofz} diff --git a/man/independent.models.Rd b/man/independent.models.Rd index 1ef57a7..179d770 100644 --- a/man/independent.models.Rd +++ b/man/independent.models.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/independent.models.R \name{independent.models} \alias{independent.models} \title{independent.models} diff --git a/man/list.responses.continuous.multi.Rd b/man/list.responses.continuous.multi.Rd index c33cdc3..7c110c9 100644 --- a/man/list.responses.continuous.multi.Rd +++ b/man/list.responses.continuous.multi.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/list.responses.continuous.R \name{list.responses.continuous.multi} \alias{list.responses.continuous.multi} \title{Description: Investigate association of a continuous variable and the modes; given a list of groupings} diff --git a/man/list.responses.continuous.single.Rd b/man/list.responses.continuous.single.Rd index 5249a88..461ddf6 100644 --- a/man/list.responses.continuous.single.Rd +++ b/man/list.responses.continuous.single.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/list.responses.continuous.R \name{list.responses.continuous.single} \alias{list.responses.continuous.single} \title{Description: Investigate association of a continuous variable and the modes} diff --git a/man/list.responses.factor.Rd b/man/list.responses.factor.Rd index 9ea7cbf..1780844 100644 --- a/man/list.responses.factor.Rd +++ b/man/list.responses.factor.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/list.responses.factor.R \name{list.responses.factor} \alias{list.responses.factor} \title{Description: List significantly associated responses for all factors and levels in the given diff --git a/man/list.responses.factor.minimal.Rd b/man/list.responses.factor.minimal.Rd index 75d61f0..1caf6df 100644 --- a/man/list.responses.factor.minimal.Rd +++ b/man/list.responses.factor.minimal.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/list.responses.factor.minimal.R \name{list.responses.factor.minimal} \alias{list.responses.factor.minimal} \title{Description: List significantly associated responses for all factors and levels in the given diff --git a/man/list.significant.responses.Rd b/man/list.significant.responses.Rd index c1c9983..21dd2e9 100644 --- a/man/list.significant.responses.Rd +++ b/man/list.significant.responses.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/order.responses.R \name{list.significant.responses} \alias{list.significant.responses} \title{List responses with significant associations to a given sample group.} diff --git a/man/listify.groupings.Rd b/man/listify.groupings.Rd index cfb3061..62f176c 100644 --- a/man/listify.groupings.Rd +++ b/man/listify.groupings.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/listify.groupings.R \name{listify.groupings} \alias{listify.groupings} \title{Convert grouping info into a list; each element corresponds to a diff --git a/man/mixture.model.Rd b/man/mixture.model.Rd index 8bcfe89..9c5985c 100644 --- a/man/mixture.model.Rd +++ b/man/mixture.model.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/mixtures.R \name{mixture.model} \alias{mixture.model} \title{Description: Fit Gaussian mixture model} diff --git a/man/model.stats.Rd b/man/model.stats.Rd index 06352d1..03d38f5 100644 --- a/man/model.stats.Rd +++ b/man/model.stats.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/model.stats.R \name{model.stats} \alias{model.stats} \title{model.stats} diff --git a/man/netresponse-package.Rd b/man/netresponse-package.Rd index 6139cc7..3d27b1d 100644 --- a/man/netresponse-package.Rd +++ b/man/netresponse-package.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/pkg-package.R \docType{package} \name{netresponse-package} \alias{netresponse} diff --git a/man/order.responses.Rd b/man/order.responses.Rd index 53d7615..9afe444 100644 --- a/man/order.responses.Rd +++ b/man/order.responses.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/order.responses.R \name{order.responses} \alias{order.responses} \title{order.responses} diff --git a/man/osmo.Rd b/man/osmo.Rd index 485905b..acb209d 100644 --- a/man/osmo.Rd +++ b/man/osmo.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/pkg-package.R \docType{data} \name{osmo} \alias{osmo} diff --git a/man/pick.model.pairs.Rd b/man/pick.model.pairs.Rd index a2ccc25..b2fff19 100644 --- a/man/pick.model.pairs.Rd +++ b/man/pick.model.pairs.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/pick.model.pairs.R \name{pick.model.pairs} \alias{pick.model.pairs} \title{pick.model.pairs} diff --git a/man/pick.model.parameters.Rd b/man/pick.model.parameters.Rd index 8ccb957..a0cfef0 100644 --- a/man/pick.model.parameters.Rd +++ b/man/pick.model.parameters.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/internals.R \name{pick.model.parameters} \alias{pick.model.parameters} \title{pick.model.parameters} diff --git a/man/plot.data.Rd b/man/plot.data.Rd index 9a26486..4422b30 100644 --- a/man/plot.data.Rd +++ b/man/plot.data.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{plot.data} \alias{plot.data} \title{Plot observed data.} diff --git a/man/plot.expression.Rd b/man/plot.expression.Rd index 5cf2beb..f249a04 100644 --- a/man/plot.expression.Rd +++ b/man/plot.expression.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{plot.expression} \alias{plot.expression} \title{plot.expression} diff --git a/man/plot.response.Rd b/man/plot.response.Rd index 2a1a062..b140b45 100644 --- a/man/plot.response.Rd +++ b/man/plot.response.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{plot.response} \alias{plot.response} \title{plot.response} diff --git a/man/plot.responses.Rd b/man/plot.responses.Rd index 8dd2141..c62f181 100644 --- a/man/plot.responses.Rd +++ b/man/plot.responses.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{plot.responses} \alias{plot.responses} \title{plot.responses} diff --git a/man/plot.scale.Rd b/man/plot.scale.Rd index 030fed1..d39f93a 100644 --- a/man/plot.scale.Rd +++ b/man/plot.scale.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{plot.scale} \alias{plot.scale} \title{plot.scale} diff --git a/man/plot.subnet.Rd b/man/plot.subnet.Rd index 437e30b..37ae106 100644 --- a/man/plot.subnet.Rd +++ b/man/plot.subnet.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{plot.subnet} \alias{plot.subnet} \title{plot.subnet} diff --git a/man/plotPCA.Rd b/man/plotPCA.Rd index b1381c7..cee6c99 100644 --- a/man/plotPCA.Rd +++ b/man/plotPCA.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{plotPCA} \alias{plotPCA} \title{plotPCA} diff --git a/man/plot_associations.Rd b/man/plot_associations.Rd index 8a6bff0..d536755 100644 --- a/man/plot_associations.Rd +++ b/man/plot_associations.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot-methods.R \name{plot_associations} \alias{plot_associations} \title{Association strength between category labels and responses.} diff --git a/man/plot_matrix.Rd b/man/plot_matrix.Rd index 36cc8c1..4a3aae3 100644 --- a/man/plot_matrix.Rd +++ b/man/plot_matrix.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/plot_matrix.R \name{plot_matrix} \alias{plot_matrix} \title{Visualize a matrix with one or two-way color scale. diff --git a/man/read.sif.Rd b/man/read.sif.Rd index 85da8a4..a8d1661 100644 --- a/man/read.sif.Rd +++ b/man/read.sif.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/read.network.R \name{read.sif} \alias{read.sif} \title{Reading network files} diff --git a/man/remove.negative.edges.Rd b/man/remove.negative.edges.Rd index c554bd8..d1ed9d5 100644 --- a/man/remove.negative.edges.Rd +++ b/man/remove.negative.edges.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/filter.netw.R \name{remove.negative.edges} \alias{remove.negative.edges} \title{remove.negative.edges} diff --git a/man/response.enrichment.Rd b/man/response.enrichment.Rd index 905347c..1a6582c 100644 --- a/man/response.enrichment.Rd +++ b/man/response.enrichment.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/response.enrichment.R \name{response.enrichment} \alias{response.enrichment} \title{Enrichment for a specified sample group in the given response.} diff --git a/man/response2sample.Rd b/man/response2sample.Rd index 3982d58..5ae2e04 100644 --- a/man/response2sample.Rd +++ b/man/response2sample.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/response2sample.R \name{response2sample} \alias{response2sample} \title{response2sample} diff --git a/man/sample2response.Rd b/man/sample2response.Rd index 6afca98..e89bef4 100644 --- a/man/sample2response.Rd +++ b/man/sample2response.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/sample2response.R \name{sample2response} \alias{sample2response} \title{sample2response} diff --git a/man/set.breaks.Rd b/man/set.breaks.Rd index 958aaa5..c13ff98 100644 --- a/man/set.breaks.Rd +++ b/man/set.breaks.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/visualization.R \name{set.breaks} \alias{set.breaks} \title{set.breaks} diff --git a/man/toydata.Rd b/man/toydata.Rd index da28c01..7c8d5c8 100644 --- a/man/toydata.Rd +++ b/man/toydata.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/pkg-package.R \docType{data} \name{toydata} \alias{toydata} diff --git a/man/update.model.pair.Rd b/man/update.model.pair.Rd index 022f026..07467e1 100644 --- a/man/update.model.pair.Rd +++ b/man/update.model.pair.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/update.model.pair.R \name{update.model.pair} \alias{update.model.pair} \title{update.model.pair} diff --git a/man/vdp.mixt.Rd b/man/vdp.mixt.Rd index 9aea105..2ecb3ed 100644 --- a/man/vdp.mixt.Rd +++ b/man/vdp.mixt.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/vdp.mixt.R \name{vdp.mixt} \alias{vdp.mixt} \title{vdp.mixt} diff --git a/man/vectorize.groupings.Rd b/man/vectorize.groupings.Rd index 3ec441c..0681b2e 100644 --- a/man/vectorize.groupings.Rd +++ b/man/vectorize.groupings.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/listify.groupings.R \name{vectorize.groupings} \alias{vectorize.groupings} \title{Convert grouping info into a vector; each element corresponds to a diff --git a/man/write.netresponse.results.Rd b/man/write.netresponse.results.Rd index 5034ecb..f2a093c 100644 --- a/man/write.netresponse.results.Rd +++ b/man/write.netresponse.results.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/utilities.R \name{write.netresponse.results} \alias{write.netresponse.results} \title{Write NetResponse results summary into a file.} diff --git a/src/Makevars b/src/Makevars old mode 100755 new mode 100644 diff --git a/src/netresponse.c b/src/netresponse.c old mode 100755 new mode 100644 diff --git a/tests/vdpmixture.R b/tests/vdpmixture.R old mode 100755 new mode 100644 From d4ab7dd0ab55ed6788ad1799064a02b91a0c1d80 Mon Sep 17 00:00:00 2001 From: antagomir Date: Tue, 24 Mar 2015 11:59:16 +0100 Subject: [PATCH 2/8] Rd files added --- man/NetResponseModel-class.Rd | 23 ++++++++++++++++ man/get.dat-NetResponseModel-method.Rd | 37 ++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 man/NetResponseModel-class.Rd create mode 100644 man/get.dat-NetResponseModel-method.Rd diff --git a/man/NetResponseModel-class.Rd b/man/NetResponseModel-class.Rd new file mode 100644 index 0000000..b600fd1 --- /dev/null +++ b/man/NetResponseModel-class.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/pkg-package.R +\docType{class} +\name{NetResponseModel-class} +\alias{NetResponseModel-class} +\alias{[[,NetResponseModel-method} +\alias{show,NetResponseModel-method} +\title{Class "NetResponseModel"} +\description{ +A NetResponse model. +} +\section{Objects from the Class}{ + Returned by \code{\link{detect.responses}} +function. +} +\examples{ +showClass("NetResponseModel") +} +\author{ +Leo Lahti \email{leo.lahti@iki.fi} +} +\keyword{classes} + diff --git a/man/get.dat-NetResponseModel-method.Rd b/man/get.dat-NetResponseModel-method.Rd new file mode 100644 index 0000000..a7ed4fc --- /dev/null +++ b/man/get.dat-NetResponseModel-method.Rd @@ -0,0 +1,37 @@ +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/NetResponseModel-accessors.R +\docType{methods} +\name{get.dat,NetResponseModel-method} +\alias{get.dat} +\alias{get.dat,NetResponseModel-method} +\title{Get subnetwork data} +\usage{ +\S4method{get.dat}{NetResponseModel}(model, subnet.id, sample = NULL) +} +\arguments{ +\item{model}{Result from NetResponse (detect.responses function).} + +\item{subnet.id}{Subnet identifier. A natural number which specifies one of +the subnetworks within the 'model' object.} + +\item{sample}{Define the retrieved samples} +} +\value{ +Subnet data matrix +} +\description{ +Get subnetwork data +} +\examples{ +## Load a pre-calculated netresponse model obtained with +# model <- detect.responses(toydata$emat, toydata$netw, verbose = FALSE) +# data( toydata ); get.dat(toydata$model) +} +\author{ +Leo Lahti \email{leo.lahti@iki.fi} +} +\references{ +See citation("netresponse") +} +\keyword{utilities} + From e3f3e33ca0329efb5fa7c4165880d56048c9cb9e Mon Sep 17 00:00:00 2001 From: antagomir Date: Tue, 24 Mar 2015 12:34:55 +0100 Subject: [PATCH 3/8] Travis added to README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 64a860f..127534e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ - - netresponse =========== +[![Build Status](https://api.travis-ci.org/antagomir/netresponse.png)](https://travis-ci.org/antagomir/netresponse) +[![Stories in Ready](https://badge.waffle.io/antagomir/netresponse.png?label=Ready)](http://waffle.io/antagomir/netresponse) + + Tools for functional network analysis (follow links for references): * [netresponse](http://bioinformatics.oxfordjournals.org/content/26/21/2713) @@ -23,7 +23,7 @@ For installation and usage, check the [tutorial page](vignettes/NetResponse.md). You are welcome to: - * [submit suggestions and bug-reports](https://github.com/antagomir/netresponse/issues) + * [submit suggestions and bug reports](https://github.com/antagomir/netresponse/issues) * [send a pull request](https://github.com/antagomir/netresponse/) * ping antagomir at IRCnet or FreeNode From 4e16c4cef2b0122bea995508cdcda7afa689ab69 Mon Sep 17 00:00:00 2001 From: antagomir Date: Tue, 24 Mar 2015 12:38:38 +0100 Subject: [PATCH 4/8] Testing travis --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index a99f945..f0c8780 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: netresponse Type: Package -Title: netresponse: functional network analysis +Title: Functional Network Analysis Version: 1.17.15 Date: 2015-03-24 Author: Leo Lahti, Olli-Pekka Huovilainen, Antonio Gusmao and Juuso Parkkinen From f39363fcb0b397d8f70e5ba7d77414bba1991303 Mon Sep 17 00:00:00 2001 From: antagomir Date: Tue, 24 Mar 2015 13:08:30 +0100 Subject: [PATCH 5/8] X11 removed from test --- tests/mixture.model.test.multimodal.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mixture.model.test.multimodal.R b/tests/mixture.model.test.multimodal.R index ea68dcc..930548b 100644 --- a/tests/mixture.model.test.multimodal.R +++ b/tests/mixture.model.test.multimodal.R @@ -13,7 +13,7 @@ D3 <- rbind(matrix(rnorm(Ns*Nd, mean = 0), ncol = Nd), cbind(rnorm(Ns, mean = -3), rnorm(Ns, mean = 3)) ) -X11() +#X11() par(mfrow = c(2,2)) for (mm in c("vdp", "bic")) { for (pp in c(FALSE, TRUE)) { From 811da28eec11ef56dc2f60007be44ab9990a1d90 Mon Sep 17 00:00:00 2001 From: antagomir Date: Tue, 24 Mar 2015 13:56:17 +0100 Subject: [PATCH 6/8] removed some notes --- R/order.responses.R | 48 +++++------- R/plot-methods.R | 179 ++++++++++++++++++++++++++++++-------------- R/utilities.R | 16 ---- 3 files changed, 140 insertions(+), 103 deletions(-) diff --git a/R/order.responses.R b/R/order.responses.R index 157882d..73494ab 100644 --- a/R/order.responses.R +++ b/R/order.responses.R @@ -1,16 +1,3 @@ -# Copyright (C) 2010-2013 Leo Lahti -# Contact: Leo Lahti -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - # Fixme: finish this later #order.samples <- function (subnet.id, model, phenodata, which.factor, response, method = "hypergeometric") { # @@ -51,19 +38,26 @@ #' #' @return A data frame with elements 'ordered.responses' which gives a data #' frame of responses ordered by enrichment score for the investigated sample. -#' The subnetwork, response id and enrichment score are shown. The method field -#' indicates the enrichment calculation method. The sample field lists the -#' samples et for which the enrichments were calculated. The info field lists -#' additional information on enrichment statistics. +#' The subnetwork, response id and enrichment score are shown. +#' The method field indicates the enrichment calculation method. +#' The sample field lists the samples et for which the enrichments +#' were calculated. +#' The info field lists additional information on enrichment statistics. #' @note Tools for analyzing end results of the model. #' @author Leo Lahti \email{leo.lahti@@iki.fi} #' @references See citation("netresponse") for citation details. #' @keywords utilities #' @export #' @examples # -#' # - for given sample/s (factor level), order responses (across all subnets) by association strength (enrichment score) -#' #order.responses(model, sample, method = "hypergeometric") # overrepresentation -order.responses <- function (models, sample, method = "hypergeometric", min.size = 2, max.size = Inf, min.responses = 2, subnet.ids = NULL, verbose = FALSE, data = NULL) { +#' # - for given sample/s (factor level), +#' # order responses (across all subnets) by association strength +#' # (enrichment score); overrepresentation +#' # order.responses(model, sample, method = "hypergeometric") +order.responses <- function (models, sample, method = "hypergeometric", + min.size = 2, max.size = Inf, + min.responses = 2, + subnet.ids = NULL, + verbose = FALSE, data = NULL) { # Given sample (for instance set of samples associated with a given factor # level) order the responses across all subnetworks based on their @@ -89,28 +83,22 @@ order.responses <- function (models, sample, method = "hypergeometric", min.size } - - #' List responses with significant associations to a given sample group. #' -#' List responses with significant associations to a given sample group. -#' -#' #' @param model NetResponseModel object. #' @param sample User-specified samples group for which the enrichments are #' calculated. For instance, an annotation category. #' @param qth q-value threshold for enrichments #' @param method Enrichment method. -#' @return Table containing statistics of the significantly associated -#' responses. +#' @return Statistics of the significantly associated responses. #' @author Leo Lahti \email{leo.lahti@@iki.fi} #' @seealso response.enrichment #' @references See citation("netresponse") #' @keywords utilities #' @export -#' @examples # -#' -list.significant.responses <- function (model, sample, qth = 1, method = "hypergeometric") { +#' @examples # +list.significant.responses <- function (model, sample, qth = 1, + method = "hypergeometric") { # Order responses according to their association with the given sample group o <- order.responses(model, sample = sample, method = "hypergeometric")$ordered.responses diff --git a/R/plot-methods.R b/R/plot-methods.R index 859ba43..72b4fff 100644 --- a/R/plot-methods.R +++ b/R/plot-methods.R @@ -2,8 +2,8 @@ #' Association strength between category labels and responses. #' -#' Plot association strength between user-defined category labels and responses -#' in a selected subnetwork. +#' Plot association strength between user-defined category labels and +#' responses in a selected subnetwork. #' #' Associations are showm in terms -log10(p) enrichment values for the #' annotation categories for the responses within the specified subnetwork. No @@ -23,9 +23,12 @@ #' @references See citation("netresponse"). #' @keywords utilities #' @examples # -plot_associations <- function (x, subnet.id, labels, method = "hypergeometric", mode = "group.by.classes", ...) { +plot_associations <- function (x, subnet.id, labels, + method = "hypergeometric", + mode = "group.by.classes", ...) { - names(labels) <- rownames(x@datamatrix) # assumes that labels are in same order as data if names not given + # assumes that labels are in same order as data if names not given + names(labels) <- rownames(x@datamatrix) # Number of responses for this subnet N.responses <- length(x@models[[subnet.id]]$w) @@ -43,7 +46,8 @@ plot_associations <- function (x, subnet.id, labels, method = "hypergeometric", enr <- list() for (response in 1:N.responses) { - enr[[response]] <- response.enrichment(x[[subnet.id]]$qofz, samples, response, method) + enr[[response]] <- response.enrichment(x[[subnet.id]]$qofz, + samples, response, method) } neg.log.p <- -log10(sapply(enr, function (tab) {tab$info["pvalue"]})) association.tab[as.character(lab),] <- unname(neg.log.p) @@ -51,9 +55,13 @@ plot_associations <- function (x, subnet.id, labels, method = "hypergeometric", } if (mode == "group.by.responses") { - barplot(association.tab, beside = TRUE, legend = TRUE, las = 1, cex.names = 0.8, main = "Label/response associations", ylab = "-log10(p)", ...) + barplot(association.tab, beside = TRUE, legend = TRUE, las = 1, + cex.names = 0.8, main = "Label/response associations", + ylab = "-log10(p)", ...) } else if (mode == "group.by.classes") { - barplot(t(association.tab), beside = TRUE, legend = TRUE, las = 1, cex.names = 0.8, main = "Label/response associations", ylab = "-log10(p)", ...) + barplot(t(association.tab), beside = TRUE, legend = TRUE, las = 1, + cex.names = 0.8, main = "Label/response associations", + ylab = "-log10(p)", ...) } } @@ -89,7 +97,8 @@ plotPCA <- function (x, subnet.id, labels = NULL, confidence = 0.95, ...) { if (is.numeric(subnet.id)) { subnet.id <- paste("Subnet", subnet.id, sep = "-") - warning("subnet.id given as numeric; converting to character: ", "Subnet-", subnet.id, sep="") + warning("subnet.id given as numeric; converting to character: ", + "Subnet-", subnet.id, sep="") } # model parameters @@ -122,9 +131,12 @@ plotPCA <- function (x, subnet.id, labels = NULL, confidence = 0.95, ...) { cols <- "black" } - plot(dat.pca[1:nrow(dat), ], main = paste("PCA plot: subnetwork ", subnet.id, sep = ""), xaxt = 'n', yaxt = 'n', xlab = "", ylab = "", col = cols, pch = 19) + plot(dat.pca[1:nrow(dat), ], main = paste("PCA plot: subnetwork ", + subnet.id, sep = ""), xaxt = 'n', yaxt = 'n', xlab = "", ylab = "", + col = cols, pch = 19) - if (nlab > 1) { legend("topleft", legend = as.character(unique(labels)), fill = unique(cols)) } + if (nlab > 1) { legend("topleft", + legend = as.character(unique(labels)), fill = unique(cols)) } for (ri in 1:nrow(m$mu)) { @@ -132,11 +144,13 @@ plotPCA <- function (x, subnet.id, labels = NULL, confidence = 0.95, ...) { cmat <- diag(m$sd[ri,]^2) # Projection of the covariance matrix in the PCA projection space - cmat.projection <- diag(diag(t(v)%*%cmat%*%v)) # force it diagonal as it should be + # force it diagonal as it should be + cmat.projection <- diag(diag(t(v)%*%cmat%*%v)) # Indicate estimated responses by ellipses if (!is.null(confidence)){ - add.ellipse(centroid = dat.pca[ri, ], covmat = cmat.projection, confidence = confidence) + add.ellipse(centroid = dat.pca[ri, ], covmat = cmat.projection, + confidence = confidence) } } } @@ -146,12 +160,14 @@ plotPCA <- function (x, subnet.id, labels = NULL, confidence = 0.95, ...) { #' PlotMixtureBivariate #' #' Visualize data, centroids and response confidence intervals for a given -#' Gaussian mixture model in two-dimensional (bivariate) case. Optionally, color the samples according to annotations -#' labels. +#' Gaussian mixture model in two-dimensional (bivariate) case. Optionally, +#' color the samples according to annotations labels. #' #' @param x data matrix (samples x features) #' @param means mode centroids (modes x features) -#' @param sds mode standard deviations, assuming diagonal covariance matrices (modes x features, each row giving the sqrt of covariance diagonal for the corresponding mode) +#' @param sds mode standard deviations, assuming diagonal covariance +#' matrices (modes x features, each row giving the sqrt of covariance +#' diagonal for the corresponding mode) #' @param ws weight for each mode #' @param labels Optional: sample class labels to be indicated in colors. #' @param confidence Confidence interval for the responses based on the @@ -164,7 +180,8 @@ plotPCA <- function (x, subnet.id, labels = NULL, confidence = 0.95, ...) { #' @keywords utilities #' @export #' @examples #plotMixture(dat, means, sds, ws) -PlotMixtureBivariate <- function (x, means, sds, ws, labels = NULL, confidence = 0.95, main = "", ...) { +PlotMixtureBivariate <- function (x, means, sds, ws, labels = NULL, + confidence = 0.95, main = "", ...) { if (!is.null(labels)) { if (is.null(names(labels))) { @@ -183,9 +200,11 @@ PlotMixtureBivariate <- function (x, means, sds, ws, labels = NULL, confidence = cols <- "black" } - plot(dat.proj[1:nrow(x), ], main = main, xaxt = 'n', yaxt = 'n', xlab = "", ylab = "", col = cols, pch = 19) + plot(dat.proj[1:nrow(x), ], main = main, xaxt = 'n', yaxt = 'n', + xlab = "", ylab = "", col = cols, pch = 19) - if (nlab > 1) { legend("topleft", legend = as.character(unique(labels)), fill = unique(cols)) } + if (nlab > 1) { legend("topleft", legend = as.character(unique(labels)), + fill = unique(cols)) } for (ri in 1:nrow(means)) { @@ -194,7 +213,8 @@ PlotMixtureBivariate <- function (x, means, sds, ws, labels = NULL, confidence = # Indicate estimated responses by ellipses if (!is.null(confidence)){ - add.ellipse(centroid = dat.proj[ri, ], covmat = cmat, confidence = confidence) + add.ellipse(centroid = dat.proj[ri, ], covmat = cmat, + confidence = confidence) } } } @@ -202,18 +222,24 @@ PlotMixtureBivariate <- function (x, means, sds, ws, labels = NULL, confidence = #' PlotMixtureMultivariate #' #' Visualize data, centroids and response confidence intervals for a given -#' Gaussian mixture model with PCA. Optionally, color the samples according to annotations -#' labels. +#' Gaussian mixture model with PCA. Optionally, color the samples according +#' to annotations labels. #' #' @param x data matrix (samples x features) #' @param means mode centroids (modes x features) -#' @param sds mode standard deviations, assuming diagonal covariance matrices (modes x features, each row giving the sqrt of covariance diagonal for the corresponding mode) +#' @param sds mode standard deviations, assuming diagonal covariance matrices +#' (modes x features, each row giving the sqrt of covariance diagonal +#' for the corresponding mode) #' @param ws weight for each mode #' @param labels Optional: sample class labels to be indicated in colors. #' @param title title -#' @param modes Optional: provide sample modes for visualization already in the input -#' @param pca The data is projected on PCA plane by default (pca = TRUE). By setting this off (pca = FALSE) it is possible to visualize two-dimensional data in the original domain. -#' @param qofz Sample-response probabilistic assignments matrix (samples x responses) +#' @param modes Optional: provide sample modes for visualization already in +#' the input +#' @param pca The data is projected on PCA plane by default (pca = TRUE). +#' By setting this off (pca = FALSE) it is possible to visualize +#' two-dimensional data in the original domain. +#' @param qofz Sample-response probabilistic assignments matrix +#' (samples x responses) #' @param ... Further arguments for plot function. #' @return Used for its side-effects. #' @author Leo Lahti \email{leo.lahti@@iki.fi} @@ -221,9 +247,12 @@ PlotMixtureBivariate <- function (x, means, sds, ws, labels = NULL, confidence = #' @keywords utilities #' @export #' @examples #plotMixture(dat, means, sds, ws) -PlotMixtureMultivariate <- function (x, means, sds, ws, labels = NULL, title = NULL, modes = NULL, pca = FALSE, qofz = NULL, ...) { +PlotMixtureMultivariate <- function (x, means, sds, ws, labels = NULL, + title = NULL, modes = NULL, pca = FALSE, + qofz = NULL, ...) { - # x <- t(X); means = model$params$mu; sds = model$params$sd; ws = model$params$w; labels <- NULL; title = "" + # x <- t(X); means = model$params$mu; sds = model$params$sd; + # ws = model$params$w; labels <- NULL; title = "" # Circumvent warnings Comp.1 <- Comp.2 <- dat2 <- NULL @@ -252,7 +281,8 @@ PlotMixtureMultivariate <- function (x, means, sds, ws, labels = NULL, title = N xtitle <- "PCA1" ytitle <- "PCA2" - if (is.null(title)) {title <- paste("PCA (", ncol(x), " features)", sep = "")} + if (is.null(title)) {title <- paste("PCA (", ncol(x), " features)", + sep = "")} } else { @@ -289,7 +319,8 @@ PlotMixtureMultivariate <- function (x, means, sds, ws, labels = NULL, title = N df$mode <- factor(modes) theme_set(theme_bw(15)) - p <- ggplot(df, aes(x = Comp.1, y = Comp.2, colour = mode)) + geom_point() + ggtitle(title) + xlab(xtitle) + ylab(ytitle) + p <- ggplot(df, aes(x = Comp.1, y = Comp.2, colour = mode)) + geom_point() + p <- p + ggtitle(title) + xlab(xtitle) + ylab(ytitle) print(p) p @@ -325,7 +356,9 @@ plot.data <- function (x, subnet.id, labels, ...) { dat <- t(get.dat(x, subnet.id)) # samples x nodes df <- data.frame(list(labels = labels, dat)) dfm <- melt(df, id = "labels") - p <- ggplot(dfm) + aes(x = labels, y = dfm$value) + facet_wrap(~variable) + geom_boxplot() + opts(title = paste(subnet.id, ": annotation boxplot", sep = "")) + p <- ggplot(dfm) + aes(x = labels, y = dfm$value) + facet_wrap(~variable) + p <- p + geom_boxplot() + p <- p + ggtitle(paste(subnet.id, ": annotation boxplot", sep = "")) print(p) p @@ -362,12 +395,14 @@ plot.expression <- function (x, maintext, ...) { # was: plot.matrix mybreaks <- set.breaks(1, interval = .02) mypalette <- colorRampPalette(c("blue", "black", "red"), space = "rgb") - # compute differential expression in nodes with respect to the mean expression level for each gene + # compute differential expression in nodes with respect to the mean + # expression level for each gene ctrl.state <- colMeans(x) dmat <- t(t(x) - ctrl.state) # Color plot of the whole expression matrix, ordered by responses - tmp <- plot_matrix(dmat, mybreaks = mybreaks, maintext=maintext, cexlab=1, mypalette = mypalette) + tmp <- plot_matrix(dmat, mybreaks = mybreaks, maintext=maintext, cexlab=1, + mypalette = mypalette) } @@ -399,13 +434,15 @@ plot.subnet <- function (x, subnet.id, network, plot.names = TRUE, ...) { if (is.numeric(subnet.id)) { subnet.id <- paste("Subnet", subnet.id, sep = "-") - warning("subnet.id given as numeric; converting to character: ", "Subnet-", subnet.id, sep="") + warning("subnet.id given as numeric; converting to character: ", + "Subnet-", subnet.id, sep="") } subnet.nodes <- get.subnets(x)[[subnet.id]] mynet <- network[subnet.nodes, subnet.nodes] - tmp <- plot.response(x = NULL, mynet, mybreaks = NULL, mypalette = NULL, colors = FALSE, maintext = subnet.id) + tmp <- plot.response(x = NULL, mynet, mybreaks = NULL, mypalette = NULL, + colors = FALSE, maintext = subnet.id) mynet @@ -441,13 +478,13 @@ plot.subnet <- function (x, subnet.id, network, plot.names = TRUE, ...) { #' interaction networks. Submitted. #' @keywords utilities #' @export -#' @examples # -#' -#' #tmp <- plot.response(model, mynet, maintext = paste("Subnetwork", subnet.id)) +#' @examples +#' #tmp <- plot.response(model, mynet, +#' # maintext = paste("Subnetwork", subnet.id)) #' plot.response <- -function (x, mynet, mybreaks, mypalette, plot.names = TRUE, colors = TRUE, plot.type = "twopi", - ...) { +function (x, mynet, mybreaks, mypalette, plot.names = TRUE, colors = TRUE, + plot.type = "twopi", ...) { check.bins <- function (difexp, mybreaks) { @@ -522,7 +559,8 @@ function (x, mynet, mybreaks, mypalette, plot.names = TRUE, colors = TRUE, plot. #' @param mar Figure margins. #' @param horiz Logical. Horizontal barplot. #' @param datamatrix datamatrix -#' @param scale scale the phylotypes to unit length (only implemented for plot.mode = "matrix" +#' @param scale scale the phylotypes to unit length (only implemented for +#' plot.mode = "matrix" #' @param ... Further arguments for plot function. #' @return Used for its side-effects. #' @author Leo Lahti \email{leo.lahti@@iki.fi} @@ -533,9 +571,15 @@ function (x, mynet, mybreaks, mypalette, plot.names = TRUE, colors = TRUE, plot. #' @examples # #' #res <- detect.responses(D, netw) #' #vis <- plot.responses(res, subnet.id) -plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = "network", xaxis = TRUE, yaxis = TRUE, plot.type = "twopi", mar = c(5, 4, 4, 2), horiz = TRUE, datamatrix = NULL, scale = FALSE, ...) { +plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, + plot.mode = "network", xaxis = TRUE, yaxis = TRUE, + plot.type = "twopi", mar = c(5, 4, 4, 2), + horiz = TRUE, datamatrix = NULL, + scale = FALSE, ...) { - # xaxis = TRUE; yaxis = TRUE; plot.type = "twopi"; mar = c(5, 4, 4, 2); horiz = TRUE; datamatrix = NULL; scale = FALSE; x <- res; nc <- 3; plot.names = TRUE; plot.mode = "pca"; main = paste("NoPCA; NoDM") + # xaxis = TRUE; yaxis = TRUE; plot.type = "twopi"; mar = c(5, 4, 4, 2); + # horiz = TRUE; datamatrix = NULL; scale = FALSE; x <- res; nc <- 3; + # plot.names = TRUE; plot.mode = "pca"; main = paste("NoPCA; NoDM") responses <- NULL variable <- NULL @@ -569,7 +613,8 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = mybreaks <- set.breaks(1, interval = .02) mypalette <- colorRampPalette(c("blue", "white", "red"), space = "rgb") - # compute differential expression in nodes with respect to the mean expression level for each gene + # compute differential expression in nodes with respect to the mean + # expression level for each gene ctrl.state <- colMeans(datamatrix) centroids <- t(pars$mu) difexp <- apply(centroids, 2, function(x){ x - ctrl.state }) @@ -582,8 +627,10 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = if (plot.mode == "network") { par(mfrow = c(ceiling(length(pars$w)/nc), nc)) for (comp in 1:length(pars$w)) { - tmp <- plot.response(difexp[,comp], mynet, mybreaks, mypalette, plot.names, - main = paste(subnet.id, "/Response-", comp, sep=""), plot.type = plot.type, ...) + tmp <- plot.response(difexp[,comp], mynet, mybreaks, mypalette, + plot.names, + main = paste(subnet.id, "/Response-", comp, sep=""), + plot.type = plot.type, ...) } } else if (plot.mode == "matrix" || plot.mode == "heatmap") { @@ -604,7 +651,9 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = if (horiz) { tmp <- plot_matrix(t(dmat), mybreaks = mybreaks, maintext = subnet.id, xlab=NULL, ylab=NULL, palette = mypalette, xaxis = yaxis, yaxis = xaxis, mar = mar, ...) } else { - tmp <- plot_matrix(dmat, mybreaks = mybreaks, maintext = subnet.id, xlab=NULL, ylab=NULL, palette = mypalette, xaxis = xaxis, yaxis = yaxis, mar = mar, ...) + tmp <- plot_matrix(dmat, mybreaks = mybreaks, maintext = subnet.id, + xlab=NULL, ylab=NULL, palette = mypalette, xaxis = xaxis, yaxis = yaxis, + mar = mar, ...) } } else if (plot.mode == "boxplot.data") { @@ -618,7 +667,9 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = df <- data.frame(list(responses = label, dat)) dfm <- melt(df, id = "responses") - p <- ggplot(dfm) + aes(x = responses, y = value) + facet_wrap(~variable) + geom_boxplot() + ggtitle(paste(subnet.id, ": response boxplot", sep = "")) + p <- ggplot(dfm) + aes(x = responses, y = value) + facet_wrap(~variable) + p <- p + geom_boxplot() + p <- p + ggtitle(paste(subnet.id, ": response boxplot", sep = "")) print(p) @@ -626,7 +677,8 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = # FIXME: does not work - # Plot cross-bars for estimated means and 95% intervals for each response for each node + # Plot cross-bars for estimated means and 95% intervals for each + # response for each node m <- get.model.parameters(x, subnet.id) # Use 1.96*std of the mean (95% quantile) for error limits @@ -638,18 +690,24 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = s2r <- apply(x[[subnet.id]]$qofz, 1, which.max) dat <- t(get.dat(x, subnet.id)) # samples x nodes - response <- factor(s2r) #factor(apply(sample2response(x, subnet.id), 1, which.max)) + response <- factor(s2r) + #factor(apply(sample2response(x, subnet.id), 1, which.max)) df <- data.frame(dat) df$response <- response dfm <- melt(df, id.var = "response") - ggplot(dfm) + aes(x = response, y = value, fill = response) + facet_wrap(~variable) + geom_bar(stat="identity") + ggplot(dfm) + aes(x = response, y = value, fill = response) + + facet_wrap(~variable) + geom_bar(stat="identity") # mean and std of mean - df <- ddply(dfm, c("response", "variable"), function (dd) {c(mean = mean(dd$value), sd = 1.96*sd(dd$value)/sqrt(sum(x[[subnet.id]]$qofz[, dd$response])))}) + df <- ddply(dfm, c("response", "variable"), function (dd) { + c(mean = mean(dd$value), + sd = 1.96*sd(dd$value)/sqrt(sum(x[[subnet.id]]$qofz[, dd$response])))}) - p <- qplot(response, mean, fill=variable, data=df, geom="bar", position="dodge") - p <- p + geom_errorbar(aes(ymax=mean+sd, ymin=mean-sd), position="dodge") + theme_bw() + p <- qplot(response, mean, fill=variable, data=df, geom="bar", + position="dodge") + p <- p + geom_errorbar(aes(ymax=mean+sd, ymin=mean-sd), + position="dodge") + theme_bw() print(p) @@ -677,7 +735,8 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = title = subnet.id, pca = pca) - # PlotMixtureBivariate(dmat, means, sds, ws, labels = NULL, confidence = 0.95, main = "") + # PlotMixtureBivariate(dmat, means, sds, ws, labels = NULL, + confidence = 0.95, main = "") # tmp <- plotPCA(x, subnet.id, labels = NULL, confidence = 0.95) @@ -696,7 +755,9 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = #' Plot the color scale used in visualization. #' #' -#' @usage \method{plot}{scale}(x, y, m = NULL, cex.axis = 1.5, label.step = 2, interval = 0.1, two.sided = TRUE, label.start = NULL, Nlab = 3, ...) +#' @usage \method{plot}{scale}(x, y, m = NULL, cex.axis = 1.5, +#' label.step = 2, interval = 0.1, two.sided = TRUE, +#' label.start = NULL, Nlab = 3, ...) #' @param x Breakpoints for the plot. #' @param y Color palette. #' @param m Breakpoints' upper limit. @@ -717,9 +778,13 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, plot.mode = #' #vis <- plot.responses(res, subnet.idx) #' #plot.scale(vis$breaks, vis$palette) #' -plot.scale <- function (x, y, m = NULL, cex.axis = 1.5, label.step = 2, interval = .1, two.sided = TRUE, label.start = NULL, Nlab = 3, ...) { +plot.scale <- function (x, y, m = NULL, cex.axis = 1.5, label.step = 2, + interval = .1, two.sided = TRUE, label.start = NULL, + Nlab = 3, ...) { - # x <- tmp$breaks; y <- tmp$palette; m = NULL; cex.axis = 1.5; label.step = 2; interval = .1; two.sided = TRUE; label.start = NULL; Nlab = 3 + # x <- tmp$breaks; y <- tmp$palette; m = NULL; cex.axis = 1.5; + # label.step = 2; interval = .1; two.sided = TRUE; + # label.start = NULL; Nlab = 3 if (two.sided) { diff --git a/R/utilities.R b/R/utilities.R index d762919..396d764 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -1,19 +1,3 @@ -# Copyright (C) 2010-2013 Leo Lahti -# Contact: Leo Lahti -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - - - - #' Write NetResponse results summary into a file. #' #' Write NetResponse results summary into a file. From e32587ffea182cca3d0766d2705a6dad49f0f7e3 Mon Sep 17 00:00:00 2001 From: antagomir Date: Tue, 24 Mar 2015 14:24:25 +0100 Subject: [PATCH 7/8] error fixed --- R/plot-methods.R | 3 +-- man/PlotMixtureBivariate.Rd | 8 +++++--- man/PlotMixtureMultivariate.Rd | 18 ++++++++++++------ man/list.significant.responses.Rd | 3 +-- man/order.responses.Rd | 15 +++++++++------ man/plot.response.Rd | 5 ++--- man/plot.responses.Rd | 3 ++- man/plot.scale.Rd | 4 +++- man/plot_associations.Rd | 4 ++-- 9 files changed, 37 insertions(+), 26 deletions(-) diff --git a/R/plot-methods.R b/R/plot-methods.R index 72b4fff..59607cc 100644 --- a/R/plot-methods.R +++ b/R/plot-methods.R @@ -736,8 +736,7 @@ plot.responses <- function (x, subnet.id, nc = 3, plot.names = TRUE, pca = pca) # PlotMixtureBivariate(dmat, means, sds, ws, labels = NULL, - confidence = 0.95, main = "") - + # confidence = 0.95, main = "") # tmp <- plotPCA(x, subnet.id, labels = NULL, confidence = 0.95) } diff --git a/man/PlotMixtureBivariate.Rd b/man/PlotMixtureBivariate.Rd index 3e5aa70..91697af 100644 --- a/man/PlotMixtureBivariate.Rd +++ b/man/PlotMixtureBivariate.Rd @@ -12,7 +12,9 @@ PlotMixtureBivariate(x, means, sds, ws, labels = NULL, confidence = 0.95, \item{means}{mode centroids (modes x features)} -\item{sds}{mode standard deviations, assuming diagonal covariance matrices (modes x features, each row giving the sqrt of covariance diagonal for the corresponding mode)} +\item{sds}{mode standard deviations, assuming diagonal covariance +matrices (modes x features, each row giving the sqrt of covariance +diagonal for the corresponding mode)} \item{ws}{weight for each mode} @@ -30,8 +32,8 @@ Used for its side-effects. } \description{ Visualize data, centroids and response confidence intervals for a given -Gaussian mixture model in two-dimensional (bivariate) case. Optionally, color the samples according to annotations -labels. +Gaussian mixture model in two-dimensional (bivariate) case. Optionally, +color the samples according to annotations labels. } \examples{ #plotMixture(dat, means, sds, ws) diff --git a/man/PlotMixtureMultivariate.Rd b/man/PlotMixtureMultivariate.Rd index 4d0440f..9c61a73 100644 --- a/man/PlotMixtureMultivariate.Rd +++ b/man/PlotMixtureMultivariate.Rd @@ -12,7 +12,9 @@ PlotMixtureMultivariate(x, means, sds, ws, labels = NULL, title = NULL, \item{means}{mode centroids (modes x features)} -\item{sds}{mode standard deviations, assuming diagonal covariance matrices (modes x features, each row giving the sqrt of covariance diagonal for the corresponding mode)} +\item{sds}{mode standard deviations, assuming diagonal covariance matrices + (modes x features, each row giving the sqrt of covariance diagonal +for the corresponding mode)} \item{ws}{weight for each mode} @@ -20,11 +22,15 @@ PlotMixtureMultivariate(x, means, sds, ws, labels = NULL, title = NULL, \item{title}{title} -\item{modes}{Optional: provide sample modes for visualization already in the input} +\item{modes}{Optional: provide sample modes for visualization already in +the input} -\item{pca}{The data is projected on PCA plane by default (pca = TRUE). By setting this off (pca = FALSE) it is possible to visualize two-dimensional data in the original domain.} +\item{pca}{The data is projected on PCA plane by default (pca = TRUE). +By setting this off (pca = FALSE) it is possible to visualize +two-dimensional data in the original domain.} -\item{qofz}{Sample-response probabilistic assignments matrix (samples x responses)} +\item{qofz}{Sample-response probabilistic assignments matrix +(samples x responses)} \item{...}{Further arguments for plot function.} } @@ -33,8 +39,8 @@ Used for its side-effects. } \description{ Visualize data, centroids and response confidence intervals for a given -Gaussian mixture model with PCA. Optionally, color the samples according to annotations -labels. +Gaussian mixture model with PCA. Optionally, color the samples according +to annotations labels. } \examples{ #plotMixture(dat, means, sds, ws) diff --git a/man/list.significant.responses.Rd b/man/list.significant.responses.Rd index 21dd2e9..cca6e48 100644 --- a/man/list.significant.responses.Rd +++ b/man/list.significant.responses.Rd @@ -18,8 +18,7 @@ calculated. For instance, an annotation category.} \item{method}{Enrichment method.} } \value{ -Table containing statistics of the significantly associated -responses. +Statistics of the significantly associated responses. } \description{ List responses with significant associations to a given sample group. diff --git a/man/order.responses.Rd b/man/order.responses.Rd index 9afe444..ae035e0 100644 --- a/man/order.responses.Rd +++ b/man/order.responses.Rd @@ -32,10 +32,11 @@ By default, use all subnets.} \value{ A data frame with elements 'ordered.responses' which gives a data frame of responses ordered by enrichment score for the investigated sample. - The subnetwork, response id and enrichment score are shown. The method field - indicates the enrichment calculation method. The sample field lists the - samples et for which the enrichments were calculated. The info field lists - additional information on enrichment statistics. + The subnetwork, response id and enrichment score are shown. + The method field indicates the enrichment calculation method. + The sample field lists the samples et for which the enrichments + were calculated. + The info field lists additional information on enrichment statistics. } \description{ Orders the responses by association strength (enrichment score) to a given @@ -48,8 +49,10 @@ Tools for analyzing end results of the model. } \examples{ # -# - for given sample/s (factor level), order responses (across all subnets) by association strength (enrichment score) -#order.responses(model, sample, method = "hypergeometric") # overrepresentation +# - for given sample/s (factor level), +# order responses (across all subnets) by association strength +# (enrichment score); overrepresentation +# order.responses(model, sample, method = "hypergeometric") } \author{ Leo Lahti \email{leo.lahti@iki.fi} diff --git a/man/plot.response.Rd b/man/plot.response.Rd index b140b45..f581620 100644 --- a/man/plot.response.Rd +++ b/man/plot.response.Rd @@ -31,9 +31,8 @@ Used for its side-effects. Plot a specific transcriptional response for a given subnetwork. } \examples{ -# - -#tmp <- plot.response(model, mynet, maintext = paste("Subnetwork", subnet.id)) +#tmp <- plot.response(model, mynet, +# maintext = paste("Subnetwork", subnet.id)) } \author{ Leo Lahti, Olli-Pekka Huovilainen and Antonio Gusmao. Maintainer: diff --git a/man/plot.responses.Rd b/man/plot.responses.Rd index c62f181..82370aa 100644 --- a/man/plot.responses.Rd +++ b/man/plot.responses.Rd @@ -36,7 +36,8 @@ two-dimensional case the original coordinates are used.} \item{datamatrix}{datamatrix} -\item{scale}{scale the phylotypes to unit length (only implemented for plot.mode = "matrix"} +\item{scale}{scale the phylotypes to unit length (only implemented for +plot.mode = "matrix"} \item{...}{Further arguments for plot function.} } diff --git a/man/plot.scale.Rd b/man/plot.scale.Rd index d39f93a..8cb322c 100644 --- a/man/plot.scale.Rd +++ b/man/plot.scale.Rd @@ -4,7 +4,9 @@ \alias{plot.scale} \title{plot.scale} \usage{ -\method{plot}{scale}(x, y, m = NULL, cex.axis = 1.5, label.step = 2, interval = 0.1, two.sided = TRUE, label.start = NULL, Nlab = 3, ...) +\method{plot}{scale}(x, y, m = NULL, cex.axis = 1.5, + label.step = 2, interval = 0.1, two.sided = TRUE, + label.start = NULL, Nlab = 3, ...) } \arguments{ \item{x}{Breakpoints for the plot.} diff --git a/man/plot_associations.Rd b/man/plot_associations.Rd index d536755..9492276 100644 --- a/man/plot_associations.Rd +++ b/man/plot_associations.Rd @@ -26,8 +26,8 @@ grouping type.} Used for side effect (plotting). } \description{ -Plot association strength between user-defined category labels and responses -in a selected subnetwork. +Plot association strength between user-defined category labels and +responses in a selected subnetwork. } \details{ Associations are showm in terms -log10(p) enrichment values for the From 027ac2f6a072fa87ed2934266a964e94e7f4cdcf Mon Sep 17 00:00:00 2001 From: Bioconductor Git-SVN Bridge Date: Thu, 16 Apr 2015 21:25:29 -0700 Subject: [PATCH 8/8] Commit made by the Bioconductor Git-SVN bridge. Consists of 0 commit. Commit information: --- DESCRIPTION | 2 +- R/plot-methods.R | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 DESCRIPTION mode change 100644 => 100755 R/plot-methods.R diff --git a/DESCRIPTION b/DESCRIPTION old mode 100644 new mode 100755 index f0c8780..f6ecb83 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: netresponse Type: Package Title: Functional Network Analysis -Version: 1.17.15 +Version: 1.19.0 Date: 2015-03-24 Author: Leo Lahti, Olli-Pekka Huovilainen, Antonio Gusmao and Juuso Parkkinen Maintainer: Leo Lahti diff --git a/R/plot-methods.R b/R/plot-methods.R old mode 100644 new mode 100755