Skip to content

Commit

Permalink
Merge branch 'devel' into BLOBFISH
Browse files Browse the repository at this point in the history
  • Loading branch information
taraeicher committed Jun 17, 2024
2 parents 10ddc53 + 360626b commit 9eeaf82
Show file tree
Hide file tree
Showing 30 changed files with 1,472 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
r-version: [4.2]
r-version: [4.3]

steps:

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ tests/testthat/*.vcf
vignettes/*.npy
docs/*.npy
docs/reference/*.npy
bladder.rdata
skin.rdata
18 changes: 13 additions & 5 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.5.4
Date: 2023-09-25
Version: 1.5.17
Date: 2024-02-29
Authors@R: c(person("Marouen", "Ben Guebila",
email = "benguebila@hsph.harvard.edu", role = c("aut","cre"), comment = c(ORCID = "0000-0001-5934-966X")),
person("Tian", "Wang",
Expand All @@ -22,11 +22,11 @@ Authors@R: c(person("Marouen", "Ben Guebila",
Maintainer: Marouen Ben Guebila <marouen.b.guebila@gmail.com>
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,
igraph,
reticulate,
yarn,
pandaR,
matrixcalc
matrixcalc,
Biobase
Remotes:
stan-dev/cmdstanr,
jnpaulson/pandaR,
Expand Down Expand Up @@ -77,6 +77,14 @@ Imports:
loo,
rARPACK,
corpcor,
biomaRt,
downloader,
edgeR,
limma,
preprocessCore,
readr,
RColorBrewer,
quantro
License: GPL-3
Encoding: UTF-8
LazyData: false
Expand Down
46 changes: 45 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export(adj2regulon)
export(alpaca)
export(alpacaCrane)
export(alpacaExtractTopGenes)
export(annotateFromBiomart)
export(checkMisAnnotation)
export(checkTissuesToMerge)
export(cobra)
export(condorCluster)
export(condorCoreEnrich)
Expand All @@ -21,10 +24,15 @@ export(craneBipartite)
export(craneUnipartite)
export(createCondorObject)
export(createPandaStyle)
export(downloadGTEx)
export(dragon)
export(el2adj)
export(el2regulon)
export(elistToAdjMat)
export(filterGenes)
export(filterLowGenes)
export(filterMissingGenes)
export(filterSamples)
export(lioness)
export(lionessPy)
export(monster)
Expand All @@ -40,11 +48,15 @@ export(monsterTransformationMatrix)
export(monsterTransitionNetworkPlot)
export(monsterTransitionPCAPlot)
export(monsterdTFIPlot)
export(normalizeTissueAware)
export(otter)
export(pandaDiffEdges)
export(pandaPy)
export(pandaToAlpaca)
export(pandaToCondorObject)
export(plotCMDS)
export(plotDensity)
export(plotHeatmap)
export(priorPp)
export(puma)
export(runEgret)
Expand Down Expand Up @@ -77,12 +89,33 @@ import(reticulate)
import(stats, except= c(cov2cor,decompose,toeplitz,lowess,update,spectrum))
import(vegan, except=diversity)
import(viridisLite)
import(yarn)
importClassesFrom(Biobase,ExpressionSet)
importClassesFrom(Biobase,eSet)
importFrom(Biobase,"assayData<-")
importFrom(Biobase,"fData<-")
importFrom(Biobase,"pData<-")
importFrom(Biobase,"phenoData<-")
importFrom(Biobase,"storageMode<-")
importFrom(Biobase,AnnotatedDataFrame)
importFrom(Biobase,ExpressionSet)
importFrom(Biobase,assayData)
importFrom(Biobase,exprs)
importFrom(Biobase,fData)
importFrom(Biobase,featureNames)
importFrom(Biobase,pData)
importFrom(Biobase,storageMode)
importFrom(RColorBrewer,brewer.pal)
importFrom(assertthat,assert_that)
importFrom(biomaRt,getBM)
importFrom(biomaRt,useMart)
importFrom(downloader,download)
importFrom(edgeR,cpm)
importFrom(gplots,heatmap.2)
importFrom(graphics,abline)
importFrom(graphics,axis)
importFrom(graphics,box)
importFrom(graphics,hist)
importFrom(graphics,legend)
importFrom(graphics,mtext)
importFrom(graphics,par)
importFrom(graphics,plot)
Expand All @@ -94,6 +127,7 @@ importFrom(igraph,E)
importFrom(igraph,V)
importFrom(igraph,graph.data.frame)
importFrom(igraph,plot.igraph)
importFrom(limma,normalizeQuantiles)
importFrom(matrixStats,colSds)
importFrom(matrixStats,rowSds)
importFrom(methods,is)
Expand All @@ -103,8 +137,18 @@ importFrom(parallel,mclapply)
importFrom(penalized,optL1)
importFrom(penalized,penalized)
importFrom(penalized,predict)
importFrom(preprocessCore,normalize.quantiles)
importFrom(quantro,matdensity)
importFrom(readr,problems)
importFrom(readr,read_tsv)
importFrom(reshape,melt.array)
importFrom(reshape2,dcast)
importFrom(reshape2,melt)
importFrom(stats,ave)
importFrom(stats,cmdscale)
importFrom(stats,dist)
importFrom(stats,model.matrix)
importFrom(stats,runmed)
importFrom(stats,sd)
importFrom(tidyr,spread)
importFrom(utils,write.table)
1 change: 0 additions & 1 deletion R/ALPACA.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#' @importFrom utils write.table
#' @rawNamespace import(GOstats, except= makeGOGraph)
#' @import org.Hs.eg.db
#' @import yarn
#' @export
#'

Expand Down
3 changes: 2 additions & 1 deletion R/MONSTER.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ monsterPrintMonsterAnalysis <- function(x, ...){
#' to give to indirect compared to direct evidence. The default is 0.5 to give an
#' equal weight to direct and indirect evidence.
#' @param mode A parameter telling whether to build the regulatory networks ('buildNet') or to use provided regulatory networks
#' ('regNet'). If set to 'regNet', then the parameters motif, ni_method, ni.coefficient.cutoff, and alphaw will be set to NA.
#' ('regNet'). If set to 'regNet', then the parameters motif, ni_method, ni.coefficient.cutoff, and alphaw will be set to NA. Gene regulatory
#' networks are supplied in the 'expr' variable as a TF-by-Gene matrix, by concatenating the TF-by-Gene matrices of case and control, expr has size nTFs x 2nGenes.
#' @export
#' @import doParallel
#' @import parallel
Expand Down
13 changes: 11 additions & 2 deletions R/PUMA.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ puma <- function(motif,expr=NULL,ppi=NULL,alpha=0.1,mir_file,hamming=0.001,
expr <- expr[order(rownames(expr)),]
}else if(mode=='union'){
gene.names=unique(union(rownames(expr),unique(motif[,2])))
tf.names =unique(union(unique(ppi[,1]),unique(motif[,1])))
if(is.null(ppi)){
tf.names = unique(motif[,1])
}else{
tf.names =unique(union(unique(ppi[,1]),unique(motif[,1])))
}
num.TFs <- length(tf.names)
num.genes <- length(gene.names)
# gene expression matrix
Expand Down Expand Up @@ -117,7 +121,11 @@ puma <- function(motif,expr=NULL,ppi=NULL,alpha=0.1,mir_file,hamming=0.001,
regulatoryNetwork[Idx]=motif[,3]
}else if(mode=='intersection'){
gene.names=unique(intersect(rownames(expr),unique(motif[,2])))
tf.names =unique(intersect(unique(ppi[,1]),unique(motif[,1])))
if(is.null(ppi)){
tf.names =unique(motif[,1])
}else{
tf.names =unique(intersect(unique(ppi[,1]),unique(motif[,1])))
}
num.TFs <- length(tf.names)
num.genes <- length(gene.names)
# gene expression matrix
Expand Down Expand Up @@ -241,6 +249,7 @@ puma <- function(motif,expr=NULL,ppi=NULL,alpha=0.1,mir_file,hamming=0.001,

if(!is.null(mir_file)){
mirIndex = match(mir_file,tf.names)
mirIndex <- mirIndex[!is.na(mirIndex)]
tfCoopNetwork[mirIndex,] = 0
tfCoopNetwork[,mirIndex] = 0
seqs = seq(1, num.TFs*num.TFs, num.TFs+1)
Expand Down
Loading

0 comments on commit 9eeaf82

Please sign in to comment.