Skip to content

Commit

Permalink
Update puma (#286)
Browse files Browse the repository at this point in the history
* update documentation

* remove monster tests

* reduce monstr test

* update documentation

* remove diffedge example

* reduce monster tests

* remove spider example

* update monster examples

* remove lioness tests

* remove pada tests

* add citation

* fix puma examples

* fix puma examples

* update docs
  • Loading branch information
marouenbg committed May 31, 2023
1 parent 56fe97b commit e6c9280
Show file tree
Hide file tree
Showing 13 changed files with 276 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: netZooR
Type: Package
Title: Unified methods for the inference and analysis of gene regulatory networks
Version: 1.3.25
Version: 1.3.28
Date: 2023-03-27
Authors@R: c(person("Marouen", "Ben Guebila",
email = "benguebila@hsph.harvard.edu", role = c("aut","cre"), comment = c(ORCID = "0000-0001-5934-966X")),
Expand Down
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Generated by roxygen2: do not edit by hand

export(TIGER)
export(adj2el)
export(adj2regulon)
export(alpaca)
export(alpacaCrane)
export(alpacaExtractTopGenes)
Expand All @@ -15,6 +18,8 @@ export(craneUnipartite)
export(createCondorObject)
export(createPandaStyle)
export(dragon)
export(el2adj)
export(el2regulon)
export(elistToAdjMat)
export(lioness)
export(lionessPy)
Expand All @@ -36,6 +41,8 @@ export(pandaDiffEdges)
export(pandaPy)
export(pandaToAlpaca)
export(pandaToCondorObject)
export(prior.pp)
export(puma)
export(runEgret)
export(sambar)
export(sourcePPI)
Expand Down
11 changes: 6 additions & 5 deletions R/PUMA.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
#' "coopNet" is the cooperative network which is not updated for miRNAs
#' @examples
#' data(pandaToyData)
#' mirs = c("AHR","AR","ARID3A","ARNT","BRCA1","CEBPA","CREB1","DDIT3")
#' pumaRes <- puma(pandaToyData$motif,
#' pandaToyData$expression,NULL,hamming=.1,progress=TRUE)
#' pandaToyData$expression,NULL,mir_file=mirs,hamming=.1,progress=TRUE)
#' @references
#' Kuijjer, Marieke L., et al. "PUMA: PANDA using microRNA associations." Bioinformatics 36.18 (2020): 4765-4773.
puma <- function(motif,expr=NULL,ppi=NULL,alpha=0.1,mir_file,hamming=0.001,
Expand Down Expand Up @@ -238,11 +239,11 @@ puma <- function(motif,expr=NULL,ppi=NULL,alpha=0.1,mir_file,hamming=0.001,
rownames(tfCoopNetwork) <- tf.names
}

if(mir_file != NULL){
if(!is.null(mir_file)){
mirIndex = match(mir_file,tf.names)
tfCoopNetwork[mirIndex,] = 0
tfCoopNetwork[,mirIndex] = 0
seqs = seq(1, num.tfs*num.tfs, num.tfs+1)
seqs = seq(1, num.TFs*num.TFs, num.TFs+1)
tfCoopNetwork[seqs] <- 1
# tfCoopNetwork has now a diagonal of 1 and all entries are zeros
# for miRNA-miRNA interactions and TF-miRNA interactions
Expand Down Expand Up @@ -288,7 +289,7 @@ puma <- function(motif,expr=NULL,ppi=NULL,alpha=0.1,mir_file,hamming=0.001,
geneCoreg=minusAlpha*geneCoreg + alpha*CoReg2

#PUMA step to skip update of PPI matrix for miRNA interactions
seqs = seq(1, num.tfs*num.tfs, num.tfs+1)
seqs = seq(1, num.TFs*num.TFs, num.TFs+1)
savediag = tfCoopNetwork[seqs] # save diagonal
tfCoopNetwork[mirIndex,] <- TFCoopInit[mirIndex,]
tfCoopNetwork[,mirIndex] <- TFCoopInit[,mirIndex]
Expand Down Expand Up @@ -422,4 +423,4 @@ prepResult <- function(zScale, output, regulatoryNetwork, geneCoreg, tfCoopNetwo
}

pandaObj <- setClass("panda", slots=c("regNet","coregNet","coopNet","numGenes","numTFs","numEdges"))
setMethod("show","panda",function(object){print.panda(object)})
setMethod("show","panda",function(object){print.panda(object)})
4 changes: 2 additions & 2 deletions R/SPIDER.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
#' pandaToyData$epifilter = pandaToyData$motif
#' nind=floor(runif(5000, min=1, max=dim(pandaToyData$epifilter)[1]))
#' pandaToyData$epifilter[nind,3] = 0
#' #spiderRes <- spider(pandaToyData$motif,pandaToyData$expression,
#' # pandaToyData$epifilter,pandaToyData$ppi,hamming=.1,progress=TRUE)
#' spiderRes <- spider(pandaToyData$motif,pandaToyData$expression,
#' pandaToyData$epifilter,pandaToyData$ppi,hamming=.1,progress=TRUE)
#' @references
#' Sonawane, Abhijeet Rajendra, et al. "Constructing gene regulatory networks using epigenetic data." npj Systems Biology and Applications 7.1 (2021): 1-13.
spider <- function(motif,expr=NULL,epifilter=NULL,ppi=NULL,alpha=0.1,hamming=0.001,
Expand Down
71 changes: 71 additions & 0 deletions man/TIGER.Rd

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

18 changes: 18 additions & 0 deletions man/adj2el.Rd

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

17 changes: 17 additions & 0 deletions man/adj2regulon.Rd

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

18 changes: 18 additions & 0 deletions man/el2adj.Rd

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

18 changes: 18 additions & 0 deletions man/el2regulon.Rd

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

2 changes: 1 addition & 1 deletion man/pandaPy.Rd

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

19 changes: 19 additions & 0 deletions man/prior.pp.Rd

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

96 changes: 96 additions & 0 deletions man/puma.Rd

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

4 changes: 2 additions & 2 deletions man/spider.Rd

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

0 comments on commit e6c9280

Please sign in to comment.