Skip to content

Commit

Permalink
Merge branch 'master' of github.com:antagomir/netresponse
Browse files Browse the repository at this point in the history
  • Loading branch information
antagomir committed Sep 15, 2015
2 parents dd14e14 + 027ac2f commit 2b9d0e1
Show file tree
Hide file tree
Showing 101 changed files with 427 additions and 219 deletions.
Empty file modified .Rbuildignore
100755 → 100644
Empty file.
8 changes: 3 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: netresponse
Type: Package
Title: netresponse: functional network analysis
Version: 1.17.13
Date: 2014-11-05
Title: Functional Network Analysis
Version: 1.19.0
Date: 2015-03-24
Author: Leo Lahti, Olli-Pekka Huovilainen, Antonio Gusmao and Juuso Parkkinen
Maintainer: Leo Lahti <[email protected]>
Description: Algorithms for functional network analysis. Includes an
Expand All @@ -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
2 changes: 1 addition & 1 deletion NAMESPACE
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Empty file modified R/AllClasses.R
100755 → 100644
Empty file.
Empty file modified R/AllGenerics.R
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion R/NetResponseModel-accessors.R
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Empty file modified R/detect.responses.R
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions R/firstlib.R
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#' @import parallel
#' @import RColorBrewer
#' @import Rgraphviz
#' @import methods
#' @importFrom igraph igraph.to.graphNEL
#' @importFrom igraph igraph.from.graphNEL
#' @importFrom igraph subgraph
#' @importFrom igraph graph.data.frame
#' @importFrom igraph graph.edgelist
#' @import qvalue
#' @import mclust
#' @import methods
#' @importFrom plyr ddply
#' @importFrom minet build.mim
#' @importFrom reshape melt
Expand All @@ -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')
}
Empty file modified R/internals.R
100755 → 100644
Empty file.
Empty file modified R/model.stats.R
100755 → 100644
Empty file.
48 changes: 18 additions & 30 deletions R/order.responses.R
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# Copyright (C) 2010-2013 Leo Lahti
# Contact: Leo Lahti <[email protected]>
#
# 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") {
#
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 2b9d0e1

Please sign in to comment.