Skip to content

Commit

Permalink
1.6.2 (#339)
Browse files Browse the repository at this point in the history
* Modified the LIONESS R code to disallow PANDA inference unless either a PPI or motif are provided

* add mode parameter to lioness (#336)

* update maintainer

* update maintainer

* update maintainer

* update maintainer (#337)

* update maintainer

* update maintainer

* Update ALPACA.R

* update sambar (#338)

---------

Co-authored-by: Tara Eicher <[email protected]>
  • Loading branch information
marouenbg and taraeicher authored Jan 31, 2025
1 parent 9dd9438 commit bab4685
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 11 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: netZooR
Type: Package
Title: Unified methods for the inference and analysis of gene regulatory networks
Version: 1.6.0
Date: 2024-07-26
Version: 1.6.1
Date: 2024-11-26
Authors@R: c(person("Tara", "Eicher",
email = "[email protected]", role = c("aut","cre"), comment = c(ORCID = "0000-0003-1809-4458")),
person("Marouen", "Ben Guebila",
Expand All @@ -23,7 +23,6 @@ Authors@R: c(person("Tara", "Eicher",
email = "",role = "aut", comment = c(ORCID = "0000-0002-8042-7201")),
person("Kate", "Shutta",
email = "",role = "aut", comment = c(ORCID = "0000-0003-0402-3771")))
Maintainer: Tara Eicher <[email protected]>
Description: netZooR unifies the implementations of several Network Zoo methods (netzoo, netzoo.github.io) into a single package by creating interfaces between network inference and network analysis methods. Currently, the package has 3 methods for network inference including PANDA and its optimized implementation OTTER (network reconstruction using mutliple lines of biological evidence), LIONESS (single-sample network inference), and EGRET (genotype-specific networks). Network analysis methods include CONDOR (community detection), ALPACA (differential community detection), CRANE (significance estimation of differential modules), MONSTER (estimation of network transition states). In addition, YARN allows to process gene expresssion data for tissue-specific analyses and SAMBAR infers missing mutation data based on pathway information.
Depends: R (>= 4.2.0),
igraph,
Expand Down
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export(adj2regulon)
export(alpaca)
export(alpacaCrane)
export(alpacaExtractTopGenes)
export(alpacaListToGo)
export(annotateFromBiomart)
export(checkMisAnnotation)
export(checkTissuesToMerge)
Expand Down Expand Up @@ -62,11 +63,14 @@ export(priorPp)
export(puma)
export(runEgret)
export(sambar)
export(sambarConvertgmt)
export(sambarCorgenelength)
export(sourcePPI)
export(spider)
export(tiger)
export(visPandaInCytoscape)
import(AnnotationDbi, except= select)
import(AnnotationDbi, except= select)

import(GO.db)
import(GOstats, except= makeGOGraph)
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
CHANGES IN VERSION 1.6.1
--------------------------

- Update: MONSTER has a wrapper function to process input
- Update: LIONESS can use new data merging strategies ('union','intersection','legacy') as opposed to union by default


CHANGES IN VERSION 1.6.0
--------------------------

Expand Down
2 changes: 1 addition & 1 deletion R/ALPACA.R
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ alpacaNodeToGene <- function(x){strsplit(x,split="_")[[1]][1]}
#' @rawNamespace import(GOstats, except= makeGOGraph)
#' @import org.Hs.eg.db
#' @rawNamespace import(AnnotationDbi, except= select)
#'
#' @export

alpacaListToGo <- function(gene.list,univ.vec,comm.nums){

Expand Down
13 changes: 10 additions & 3 deletions R/LIONESS.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ lionessPy <- function(expr_file, motif_file=NULL, ppi_file=NULL, computing="cpu"
#' Options include "pearson".
#' @param ncores int specifying the number of cores to be used. Default is 1.
#' (Note: constructing panda networks can be memory-intensive, and the number of cores should take into consideration available memory.)
#' @param union Aggregation mode between three input networks: Union (default), intersection, legacy (maps on motif network).
#' @param ... additional arguments for panda analysis
#' @keywords keywords
#' @importFrom matrixStats rowSds
Expand All @@ -186,19 +187,25 @@ lionessPy <- function(expr_file, motif_file=NULL, ppi_file=NULL, computing="cpu"
#' Kuijjer, M.L., Tung, M., Yuan, G., Quackenbush, J. and Glass, K., 2015.
#' Estimating sample-specific regulatory networks. arXiv preprint arXiv:1505.06440.
#' Kuijjer, M.L., Hsieh, PH., Quackenbush, J. et al. lionessR: single sample network inference in R. BMC Cancer 19, 1003 (2019). https://doi.org/10.1186/s12885-019-6235-7
lioness = function(expr, motif = NULL, ppi = NULL, network.inference.method = "panda", ncores = 1, ...){
lioness = function(expr, motif = NULL, ppi = NULL, network.inference.method = "panda", ncores = 1, mode = "union", ...){

# If both the PPI and motif are NULL, default to Pearson instead of PANDA.
if(is.null(motif) && is.null(ppi) && network.inference.method == "panda"){
message("Because input has neither a motif nor a PPI, we are defaulting to Pearson inference.")
network.inference.method = "pearson"
}
N <- ncol(expr)
if(ncores < 1){
print('Setting number of cores to 1.')
ncores <- 1
}
if(network.inference.method == "panda")
{
fullnet <- panda(motif, expr, ppi, ...)
fullnet <- panda(motif, expr, ppi, mode = mode, ...)
return(mclapply(seq_len(N), function(i) {
print(paste("Computing network for sample ", i))
N * fullnet@regNet - (N - 1) * panda(motif, expr[, -i],
ppi, ...)@regNet
ppi, mode = mode, ...)@regNet
}, mc.cores = ncores))
}
if(network.inference.method == "pearson")
Expand Down
8 changes: 4 additions & 4 deletions R/SAMBAR.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
#' @param signature A file containing gene sets (signatures) in .gmt format. These gene sets will be used to de-sparsify the gene-level mutation scores.
#' @param cagenes A vector of genes, for example of cancer-associated genes. This will be used to subset the gene-level mutation data to.
#' @return A matrix containing gene set mutation scores.
#
# OBS! cagenes should be optional
# dependencies: utils
#' @export
#'
sambarConvertgmt <- function(signature, cagenes){

# determine the maximum number of genes a signature can have in the .gmt file
Expand Down Expand Up @@ -43,7 +42,8 @@ sambarConvertgmt <- function(signature, cagenes){
#' @param cagenes A vector of genes, for example of cancer-associated genes. This will be used to subset the gene-level mutation data to.
#' @param exonsize A vector of gene lengths. This will be used to normalize the gene mutation scores.
#' @return Mutation rate-adjusted gene mutation scores.
#
#' @export
#'
sambarCorgenelength <- function(x, cagenes, exonsize){

# subset mutation data to cancer-associated genes
Expand Down
3 changes: 3 additions & 0 deletions man/lioness.Rd

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

0 comments on commit bab4685

Please sign in to comment.