Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cobra docs #298

Merged
merged 29 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2368932
update documentation
marouenbg Mar 23, 2023
7e7e794
remove monster tests
marouenbg Mar 24, 2023
09f394f
reduce monstr test
marouenbg Mar 27, 2023
625a4ed
update documentation
marouenbg Mar 28, 2023
bb77e10
remove diffedge example
marouenbg Mar 31, 2023
e001f17
reduce monster tests
marouenbg Apr 3, 2023
5884b00
remove spider example
marouenbg Apr 4, 2023
89f94cd
update monster examples
marouenbg Apr 6, 2023
3c388ff
remove lioness tests
marouenbg Apr 8, 2023
9f1962c
remove pada tests
marouenbg Apr 10, 2023
3343f6b
add citation
marouenbg May 24, 2023
36938c0
Merge remote-tracking branch 'upstream/devel' into devel
marouenbg May 24, 2023
06156fd
Merge remote-tracking branch 'upstream/devel' into devel
marouenbg May 31, 2023
86e297d
Merge remote-tracking branch 'upstream/devel' into devel
marouenbg Sep 2, 2023
1847f8c
Merge remote-tracking branch 'upstream/devel' into devel
marouenbg Sep 21, 2023
b4bc777
add cobra docs
marouenbg Sep 21, 2023
e7447e3
build new website
marouenbg Sep 22, 2023
6d9b5e7
update package
marouenbg Sep 23, 2023
c8eead6
update package
marouenbg Sep 23, 2023
43f277a
add package
marouenbg Sep 23, 2023
33dfea4
export pandaR classes
marouenbg Sep 25, 2023
d12150d
add site html
marouenbg Sep 25, 2023
1e081f3
import classes from PANDA
marouenbg Sep 25, 2023
6746613
import classes from PANDA
marouenbg Sep 25, 2023
8b0a3bc
import classes from PANDA
marouenbg Sep 25, 2023
46feb7c
import classes from PANDA
marouenbg Sep 25, 2023
3f76095
import classes from PANDA
marouenbg Sep 25, 2023
6f14508
import classes from PANDA
marouenbg Sep 25, 2023
43bdb60
import classes from PANDA
marouenbg Sep 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading