Skip to content

Commit

Permalink
add neat to nbea methods
Browse files Browse the repository at this point in the history
  • Loading branch information
lgeistlinger committed Aug 10, 2020
1 parent 9fb0d3e commit 4357b80
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 69 deletions.
17 changes: 8 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
Package: EnrichmentBrowser
Version: 2.19.3
Date: 2020-07-08
Version: 2.19.4
Date: 2020-08-10
Title: Seamless navigation through combined results of set-based and
network-based enrichment analysis
network-based enrichment analysis
Author: Ludwig Geistlinger [aut, cre], Gergely Csaba [aut], Mara Santarelli [ctb],
Marcel Ramos [ctb], Levi Waldron [ctb], Ralf Zimmer [aut]
Mirko Signorelli [ctb], Marcel Ramos [ctb], Levi Waldron [ctb], Ralf Zimmer [aut]
Maintainer: Ludwig Geistlinger <[email protected]>
Depends: SummarizedExperiment, graph
Imports: AnnotationDbi, BiocFileCache, BiocManager, ComplexHeatmap, GSEABase,
GO.db, KEGGREST, KEGGgraph, Rgraphviz, S4Vectors, SPIA,
biocGraph, edgeR, geneplotter, graphite, hwriter, limma, methods, pathview,
safe, topGO
GO.db, KEGGREST, KEGGgraph, Rgraphviz, S4Vectors, SPIA, biocGraph, edgeR,
geneplotter, graphite, hwriter, limma, methods, pathview, safe, topGO
Suggests: ALL, BiocStyle, DESeq2, ReportingTools, airway, hgu95av2.db, knitr
Description: The EnrichmentBrowser package implements essential functionality
for the enrichment analysis of gene expression data. The analysis combines
Expand All @@ -23,6 +22,6 @@ License: Artistic-2.0
Encoding: UTF-8
VignetteBuilder: knitr
biocViews: ImmunoOncology, Microarray, RNASeq, GeneExpression, DifferentialExpression,
Pathways, GraphAndNetwork, Network, GeneSetEnrichment,
NetworkEnrichment, Visualization, ReportWriting
Pathways, GraphAndNetwork, Network, GeneSetEnrichment, NetworkEnrichment,
Visualization, ReportWriting
RoxygenNote: 7.1.1
9 changes: 9 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
CHANGES IN VERSION 2.20.0
-------------------------

o New function `import` to import results from differential expression
analysis with limma, edgeR, and DESeq2
o Including NEAT among nbea methods
o Dedicated vignettes for microarray and RNA-seq analysis


CHANGES IN VERSION 2.18.0
-------------------------

Expand Down
56 changes: 44 additions & 12 deletions R/nbea.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @export
nbeaMethods <- function()
c("ggea", "spia", "pathnet", "degraph",
"ganpa", "cepa", "topologygsa", "netgsa", "neat")
"ganpa", "cepa", "topologygsa", "netgsa", "neat")


#' Network-based enrichment analysis (NBEA)
Expand Down Expand Up @@ -62,10 +62,10 @@ nbeaMethods <- function()
#' about interactions among genes as well as novel interactions learned from
#' data; implemented in CRAN's NetGSA package.
#'
#' 'neat': the Network Enrichment Analysis Test (NEAT) proposed in Signorelli
#' et al. (2016) and implemented in CRAN's neat package. It compares the number
#' of links observed between two gene sets to the one expected under an
#' hypergeometric null model.
#' 'neat': network enrichment analysis test, compares the number of links between
#' differentially expressed genes and a gene set of interest to the number of
#' links expected under a hypergeometric null model; proposed by Signorelli et al.
#' (2016) and implemented in CRAN's neat package.
#'
#' It is also possible to use additional network-based enrichment methods.
#' This requires to implement a function that takes 'se', 'gs', and 'grn'
Expand All @@ -78,9 +78,10 @@ nbeaMethods <- function()
#' @param method Network-based enrichment analysis method. Currently, the
#' following network-based enrichment analysis methods are supported:
#' \sQuote{ggea}, \sQuote{spia}, \sQuote{pathnet}, \sQuote{degraph},
#' \sQuote{topologygsa}, \sQuote{ganpa}, \sQuote{cepa}, and \sQuote{netgsa}.
#' Default is 'ggea'. This can also be the name of a
#' user-defined function implementing network-based enrichment. See Details.
#' \sQuote{topologygsa}, \sQuote{ganpa}, \sQuote{cepa}, \sQuote{netgsa},
#' and \sQuote{neat}. Default is 'ggea'. This can also be the name of a
#' user-defined function implementing a method for network-based enrichment analysis.
#' See Details.
#' @param se Expression dataset. An object of class
#' \code{\linkS4class{SummarizedExperiment}}. Mandatory minimal annotations:
#' \itemize{ \item colData column storing binary group assignment (named
Expand Down Expand Up @@ -116,7 +117,7 @@ nbeaMethods <- function()
#' interactive exploration? Defaults to FALSE.
#' @param ... Additional arguments passed to individual nbea methods. This
#' includes currently: \itemize{ \item beta: Log2 fold change significance
#' level. Defaults to 1 (2-fold). } For SPIA and NEA: \itemize{ \item
#' level. Defaults to 1 (2-fold). } For SPIA and NEAT: \itemize{ \item
#' sig.stat: decides which statistic is used for determining significant DE
#' genes. Options are: \itemize{ \item 'p' (Default): genes with adjusted p-value below
#' alpha. \item 'fc': genes with abs(log2(fold change)) above beta \item '&':
Expand Down Expand Up @@ -149,14 +150,14 @@ nbeaMethods <- function()
#' Other: \code{\link{sbea}} to perform set-based enrichment analysis.
#' \code{\link{combResults}} to combine results from different methods.
#' @references Geistlinger et al. (2011) From sets to graphs: towards a
#' realistic enrichment analysis of transcriptomic systems. Bioinformatics,
#' realistic enrichment analysis of transcriptomic systems. Bioinformatics,
#' 27(13), i366-73.
#'
#' Tarca et al. (2009) A novel signaling pathway impact analysis.
#' Bioinformatics, 25(1):75-82.
#'
#' Signorelli et al. (2016). NEAT: an efficient network enrichment analysis test.
#' BMC Bioinformatics, 17, 352
#' Signorelli et al. (2016) NEAT: an efficient network enrichment analysis test.
#' BMC Bioinformatics, 17:352.
#'
#' @examples
#'
Expand Down Expand Up @@ -799,3 +800,34 @@ nbea <- function(
return(res)
}

#
# 10
#
.neat <- function(se, gs, grn,
alpha, beta = 1,
sig.stat = c("p", "fc", "|", "&"),
directed = TRUE)
{
neat <- NULL
isAvailable("neat", type = "software")

# derive genes for alist and blist
isig <- .isSig(rowData(se), alpha, beta, sig.stat)
de.list <- list(de = rownames(se)[isig])

# get network inputs
grn <- grn[,1:2]
all.nodes <- unique(as.vector(grn))

# execute neat
nettype <- ifelse(directed, "directed", "undirected")
res <- neat(alist = de.list, blist = gs, network = grn,
nettype = nettype, nodes = all.nodes, mtc.type = "none")

# restructure output of neat
rownames(res) <- res$B
res <- res[,c("nab", "expected_nab", "pvalue")]
res <- as.matrix(res)
colnames(res) <- c("OBS.LINKS", "EXP.LINKS", configEBrowser("PVAL.COL"))
return(res)
}
43 changes: 0 additions & 43 deletions R/neat.R

This file was deleted.

19 changes: 14 additions & 5 deletions man/nbea.Rd

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

0 comments on commit 4357b80

Please sign in to comment.