Skip to content

Commit

Permalink
Cobra docs (#298)
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

* add cobra docs

* build new website

* update package

* update package

* add package

* export pandaR classes

* add site html

* import classes from PANDA

* import classes from PANDA

* import classes from PANDA

* import classes from PANDA

* import classes from PANDA

* import classes from PANDA

* import classes from PANDA
  • Loading branch information
marouenbg committed Sep 25, 2023
1 parent 9be1495 commit ed3439f
Show file tree
Hide file tree
Showing 158 changed files with 27,827 additions and 41,287 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ jobs:
extSoftVersion()["BLAS"]
shell: Rscript {0}

- if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install python3-venv
pip install --upgrade pip
python3 -m venv env
source env/bin/activate
echo "VIRTUAL ENV:" $VIRTUAL_ENV
- name: Install reticulate
run: |
library("reticulate")
Expand Down
9 changes: 5 additions & 4 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.4.0
Date: 2023-06-03
Version: 1.5.4
Date: 2023-09-25
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 @@ -24,11 +24,12 @@ Description: netZooR unifies the implementations of several Network Zoo methods
Depends: R (>= 4.2.0),
igraph,
reticulate,
pandaR,
yarn,
pandaR,
matrixcalc
Remotes:
stan-dev/cmdstanr
stan-dev/cmdstanr,
jnpaulson/pandaR
biocViews:
NetworkInference,
Network,
Expand Down
5 changes: 3 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Generated by roxygen2: do not edit by hand

export(TIGER)
export(adj2el)
export(adj2regulon)
export(alpaca)
export(alpacaCrane)
export(alpacaExtractTopGenes)
export(cobra)
export(condorCluster)
export(condorCoreEnrich)
export(condorMatrixModularity)
Expand Down Expand Up @@ -41,12 +41,13 @@ export(pandaDiffEdges)
export(pandaPy)
export(pandaToAlpaca)
export(pandaToCondorObject)
export(prior.pp)
export(priorPp)
export(puma)
export(runEgret)
export(sambar)
export(sourcePPI)
export(spider)
export(tiger)
export(visPandaInCytoscape)
import(AnnotationDbi, except= select)

Expand Down
2 changes: 1 addition & 1 deletion R/COBRA.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cobra <- function(X, expressionData, standardize=T){
G <- as.matrix(G)
}

eigenG <- eigs_sym(tcrossprod(G),N)
eigenG <- rARPACK::eigs_sym(tcrossprod(G),N)

Q <- eigenG$vectors
D <- diag(eigenG$values)
Expand Down
1 change: 0 additions & 1 deletion R/PANDA.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,3 @@ pandaPy <- function(expr_file, motif_file=NULL, ppi_file=NULL, computing="cpu",
return(output)
}


2 changes: 0 additions & 2 deletions R/PUMA.R
Original file line number Diff line number Diff line change
Expand Up @@ -422,5 +422,3 @@ prepResult <- function(zScale, output, regulatoryNetwork, geneCoreg, tfCoopNetwo
pandaObj(regNet=regulatoryNetwork, coregNet=geneCoreg, coopNet=tfCoopNetwork, numGenes=numGenes, numTFs=numTFs, numEdges=numEdges)
}

pandaObj <- setClass("panda", slots=c("regNet","coregNet","coopNet","numGenes","numTFs","numEdges"))
setMethod("show","panda",function(object){print.panda(object)})
5 changes: 1 addition & 4 deletions R/SPIDER.R
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,4 @@ prepResult <- function(zScale, output, regulatoryNetwork, geneCoreg, tfCoopNetwo
resList$coopNet <- tfCoopNetwork
}
pandaObj(regNet=regulatoryNetwork, coregNet=geneCoreg, coopNet=tfCoopNetwork, numGenes=numGenes, numTFs=numTFs, numEdges=numEdges)
}

pandaObj <- setClass("panda", slots=c("regNet","coregNet","coopNet","numGenes","numTFs","numEdges"))
setMethod("show","panda",function(object){print.panda(object)})
}
8 changes: 4 additions & 4 deletions R/TIGER.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
#' @examples
#' data(TIGER_expr)
#' data(TIGER_prior)
#' TIGER(TIGER_expr,TIGER_prior)
TIGER = function(expr,prior,method="VB",TFexpressed = TRUE,
#' tiger(TIGER_expr,TIGER_prior)
tiger = function(expr,prior,method="VB",TFexpressed = TRUE,
signed=TRUE,baseline=TRUE,psis_loo = FALSE,
seed=123,out_path=NULL,out_size = 300,
a_sigma=1,b_sigma=1,a_alpha=1,b_alpha=1,
Expand All @@ -75,7 +75,7 @@ TIGER = function(expr,prior,method="VB",TFexpressed = TRUE,

#0. prepare stan input
if (signed){
prior2 = prior.pp(prior[TF.name,TG.name],expr)
prior2 = priorPp(prior[TF.name,TG.name],expr)
if (nrow(prior2)!=length(TF.name)){
TFnotExp = setdiff(TF.name,rownames(prior2))
TFnotExpEdge = prior[TFnotExp,colnames(prior2),drop=F]
Expand Down Expand Up @@ -292,7 +292,7 @@ adj2regulon = function(adj){
#' @return A filtered prior network (adjacency matrix).
#' @export
#'
prior.pp = function(prior,expr){
priorPp = function(prior,expr){

# filter tfs and tgs
tf = intersect(rownames(prior),rownames(expr)) ## TF needs to express
Expand Down
145 changes: 112 additions & 33 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,140 @@
template:
bootstrap: 5
destination: docs
reference:
- title: Main functions
desc: main functions to run each algorithm
contents:
- panda.py
- create.condor.object
- panda.to.condor.object
- lioness.py
- pandaPy
- createCondorObject
- lioness
- alpaca
- panda.to.alpaca
- sambar
- monster
- otter
- title: Plot functions
desc: function to plot the networks and community structures.
- cobra
- puma
- spider
- tiger
- runEgret
- dragon
- craneBipartite

- title: PANDA
desc: All functions of PANDA
contents:
- create.panda.style
- create.diff.panda.style
- condor.plot.communities
- condor.plot.heatmap
- starts_with("vis.")
- title: PANDA
desc: All function of PANDA
contents:
- panda.py
- panda.to.condor.object
- panda.to.alpaca
- panda.diff.edges
- create.panda.style
- vis.panda.in.cytoscape
- create.panda.style
- vis.diff.panda.in.cytoscape
- create.diff.panda.style
- pandaPy
- pandaToCondorObject
- pandaToAlpaca
- pandaDiffEdges
- visPandaInCytoscape
- createPandaStyle

- title: CONDOR
desc: All fucntions of CONDOR
contents:
desc: All functions of CONDOR
contents:
- createCondorObject
- starts_with("condor")
- create.condor.object
- title: LIONESS


- title: LIONESS
desc: All functions of LIONESS
contents:
- lioness.py
contents:
- lionessPy
- lioness

- title: ALPACA
desc: All functions of ALPACA
contents:
- starts_with("alpaca")
- title: SAMBAR

- title: SAMBAR
desc: All functions of SAMBAR
contents:
- starts_with("sambar")

- title: MONSTER
desc: All functions of MONSTER
contents:
- starts_with("monster")

- title: OTTER
desc: All functions of OTTER
desc: OTTER functions
contents:
- otter

- title : TIGER
desc: TIGER functions
contents:
- tiger
- TIGER_expr
- TIGER_prior
- adj2regulon
- priorPp

- title : COBRA
desc: COBRA functions
contents:
- cobra

- title: CRANE
desc: CRANE functions
contents:
- craneBipartite
- craneUnipartite
- elistToAdjMat
- elistSort
- elistRemoveTags
- elistSort
- isElist
- adjMatToElist
- el2adj
- el2regulon
- elistIsEdgeOrderEqual
- elistAddTags
- adj2el
- jutterDegree

- title: DRAGON
desc: DRAGON functions
contents:
- dragon

- title: SPIDER
desc: SPIDER functions
contents:
- spider
- degreeAdjust

- title: PUMA
desc: PUMA functions
contents:
- puma

- title: EGRET
desc: EGRET functions
contents:
- runEgret

- title: Plotting functions
desc: function to plot the networks and community structures.
contents:
- createPandaStyle
- condorPlotCommunities
- condorPlotHeatmap

- title: Helper functions
desc: miscellaneous function
contents:
- sourcePPI
- pandaToCondorObject
- pandaToAlpaca

- title: Data
desc: Input example data files
contents:
- starts_with("otter")
- yeast
- small1976
- mut.ucec
- exon.size
- genes
Loading

0 comments on commit ed3439f

Please sign in to comment.