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

v1.5.0 #302

Closed
wants to merge 247 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
247 commits
Select commit Hold shift + click to select a range
0f06727
add bioc information
marouenbg Nov 23, 2021
e4cb00c
Merge pull request #232 from marouenbg/add-bioc
marouenbg Nov 23, 2021
768a198
update website
marouenbg Nov 24, 2021
809e28b
Merge pull request #233 from marouenbg/update-desc
marouenbg Nov 24, 2021
d6d95a1
add crane and docs
marouenbg Dec 21, 2021
14538b2
update crane
marouenbg Dec 21, 2021
7ed368a
update worflow
marouenbg Dec 21, 2021
baa4bee
Merge pull request #235 from marouenbg/add-crane
marouenbg Dec 22, 2021
311b3d2
update crane
marouenbg Jan 29, 2022
58b38e4
update workflows
marouenbg Jan 29, 2022
0f665a3
update workflows
marouenbg Jan 29, 2022
764c899
update workfolw
marouenbg Jan 29, 2022
7180ebe
update workfolw
marouenbg Jan 29, 2022
5076cf7
update workfolw
marouenbg Jan 29, 2022
18af94d
update workfolw
marouenbg Jan 29, 2022
0f09c0d
Update main.yml
marouenbg Jan 29, 2022
7af5998
Update main.yml
marouenbg Jan 29, 2022
14e87e9
Update main.yml
marouenbg Jan 29, 2022
7a9c0d0
Merge pull request #236 from marouenbg/fix-crane-alpaca
marouenbg Jan 30, 2022
62b60af
fix lioness py
marouenbg Feb 15, 2022
f89c636
udpate lioness in R
marouenbg Feb 15, 2022
23ec0ff
include calculations python
marouenbg Feb 16, 2022
c8383f6
update panda rm missing
marouenbg Feb 17, 2022
a844667
update panda
marouenbg Feb 17, 2022
374216b
update lioness joblib
marouenbg Feb 17, 2022
923b87b
revert commits
marouenbg Feb 17, 2022
79b030b
fix conflcit
marouenbg Feb 17, 2022
c56ce28
ALPACA fix to NAs in community assignement
marouenbg Feb 17, 2022
b1b7576
version bump
marouenbg Feb 18, 2022
7b17419
Merge pull request #238 from marouenbg/upgrade-alpaca
marouenbg Feb 18, 2022
8c873db
revert lioness
marouenbg Feb 18, 2022
4cd7613
update crane with alpaca changes
marouenbg Feb 18, 2022
9f464ef
update lioness
marouenbg Feb 18, 2022
973264d
Merge pull request #239 from marouenbg/update-crane
marouenbg Feb 18, 2022
ba6fc1c
update lioness python
marouenbg Feb 18, 2022
738fbd6
fix test
marouenbg Feb 18, 2022
58ce20c
update workflows
marouenbg Feb 18, 2022
57e0d55
put back github actions
marouenbg Feb 19, 2022
2dcccc6
Merge pull request #237 from marouenbg/fix-panda-py
marouenbg Feb 19, 2022
ed3615d
Fixed typo
Feb 22, 2022
40659aa
Added LIONESS-pearson option + unit test
Feb 25, 2022
9f1d4dc
Merge branch 'kate-dev' of https://github.com/katehoffshutta/netZooR …
Feb 25, 2022
f0eaad7
changed param labels in LIONESS example
Feb 25, 2022
3a21cca
updated docs for lioness() function
Feb 28, 2022
f27d51b
Update main.yml
marouenbg Mar 1, 2022
ac02cff
Merge branch 'devel' into kate-dev
marouenbg Mar 1, 2022
27e77b7
Update main.yml
marouenbg Mar 1, 2022
d184ba7
Merge pull request #241 from katehoffshutta/kate-dev
marouenbg Mar 1, 2022
9f0e4a2
bump x.y.z version to even y prior to creation of RELEASE_3_15 branch
nturaga Apr 26, 2022
9461a1d
bump x.y.z version to odd y following creation of RELEASE_3_15 branch
nturaga Apr 26, 2022
323d058
Update DESCRIPTION
marouenbg Jun 10, 2022
4a3fdde
fix crane issue #240
marouenbg Jun 16, 2022
c7764ef
Merge pull request #244 from marouenbg/fix-crane
marouenbg Jun 16, 2022
2340eaf
expanded PANDA and LIONESS description
katehoffshutta Jun 23, 2022
eb9b13e
update crane fix
marouenbg Jun 24, 2022
2a84467
added ALPACA, EGRET, and OTTER descriptions
katehoffshutta Jun 24, 2022
98e6e3f
Update README.md
katehoffshutta Jun 24, 2022
ad57350
Merge pull request #245 from marouenbg/fix-crane-2
marouenbg Jun 24, 2022
a0194ee
typo in na.rm
marouenbg Jun 27, 2022
6d7a175
Merge pull request #246 from marouenbg/fix-crane-3
marouenbg Jun 27, 2022
077b6cd
update workflow
marouenbg Jun 27, 2022
e7c4692
update workflow2
marouenbg Jun 27, 2022
70f6d81
fix-actions-3
marouenbg Jun 27, 2022
c90c77e
add r lib v2
marouenbg Jun 27, 2022
31674f0
add r lib v2
marouenbg Jun 27, 2022
5129e1c
update condor test
marouenbg Jun 28, 2022
de7a516
update condor test
marouenbg Jun 28, 2022
de5b323
update condor test
marouenbg Jun 28, 2022
5c469c1
update condor test
marouenbg Jun 28, 2022
534a568
show testthat output
marouenbg Jun 28, 2022
fc9ecc4
add pandoc and use cache
marouenbg Jun 28, 2022
d748cd9
use built in check
marouenbg Jun 28, 2022
1836947
use built in check
marouenbg Jun 28, 2022
cc7fc1e
update actions with built in check
marouenbg Jun 28, 2022
702a3e8
bump version
marouenbg Jun 28, 2022
115b644
use built in coverage
marouenbg Jun 28, 2022
912b3b3
use built in coverage
marouenbg Jun 28, 2022
9e415ff
remove sudo
marouenbg Jun 28, 2022
f2b77ac
update actions
marouenbg Jun 28, 2022
41d1d89
update actions
marouenbg Jun 28, 2022
3fa9115
removed sudo from actions
marouenbg Jun 28, 2022
75d7ea8
ugrade to R42
marouenbg Jun 28, 2022
c1cac6c
remove virtualenv
marouenbg Jun 28, 2022
1d93ccd
remove virtualenv
marouenbg Jun 28, 2022
b505ada
remove virtualenv
marouenbg Jun 28, 2022
4336aa6
modify condor test
marouenbg Jun 29, 2022
defaf1e
update condor test
marouenbg Jun 29, 2022
e7e7ef6
update condor test
marouenbg Jun 29, 2022
563e20d
adding retiucualte to covr
marouenbg Jun 29, 2022
ba53689
adding retiucualte to covr
marouenbg Jun 29, 2022
01944de
add panda test to coverignore
marouenbg Jun 29, 2022
d2b579e
update actions
marouenbg Jun 29, 2022
48235bb
remove lioness tests from coverage
marouenbg Jun 29, 2022
6fdd4d5
remove lioness tests from coverage
marouenbg Jun 29, 2022
2b376d1
added MONSTER and SAMBAR
katehoffshutta Jun 29, 2022
c43b11a
Merge branch 'master' of https://github.com/katehoffshutta/netZooR
katehoffshutta Jun 29, 2022
0fd74ec
remove lionessR test
marouenbg Jun 29, 2022
7757acb
Added CONDOR and YARN
katehoffshutta Jun 29, 2022
8cf70b4
Update README.md
katehoffshutta Jun 29, 2022
b79e291
Merge branch 'devel' into master
marouenbg Jun 29, 2022
4139e26
put back otter in rbuild
marouenbg Jun 29, 2022
66554cf
remove condor test
marouenbg Jun 29, 2022
4b00d1a
remove condor test
marouenbg Jun 30, 2022
db9927f
remove lioness docs
marouenbg Jun 30, 2022
74ddd95
add lioness to buildingore
marouenbg Jun 30, 2022
f53d822
donttest lionesss
marouenbg Jun 30, 2022
a5023fe
remove coverage from ubuntu test
marouenbg Jun 30, 2022
48f0fe2
remove rbuilignore
marouenbg Jun 30, 2022
60d2611
update rbuildignore
marouenbg Jun 30, 2022
8ed5634
update rbuildignore
marouenbg Jun 30, 2022
23592bd
update rbuildignore
marouenbg Jun 30, 2022
94495b3
update rbuildignore
marouenbg Jun 30, 2022
9ba4746
update rbuildignore
marouenbg Jun 30, 2022
e1befc3
add back buildignore
marouenbg Jun 30, 2022
1add3e6
add back buildignore
marouenbg Jun 30, 2022
dbcaa6d
add back buildignore
marouenbg Jun 30, 2022
08f570c
add back buildignore
marouenbg Jun 30, 2022
b61e582
add back buildignore
marouenbg Jun 30, 2022
9437c40
add back buildignore
marouenbg Jun 30, 2022
29d01fa
add back buildignore
marouenbg Jun 30, 2022
4c5ea04
add back buildignore
marouenbg Jun 30, 2022
5e48772
add back buildignore
marouenbg Jun 30, 2022
1a22c9f
add back buildignore
marouenbg Jun 30, 2022
52c1c11
put back tests
marouenbg Jun 30, 2022
636c803
add padanedge diff test
marouenbg Jun 30, 2022
7ad152e
add back egeret test
marouenbg Jun 30, 2022
93275c7
add monster test
marouenbg Jun 30, 2022
c043c12
fix monster test
marouenbg Jul 1, 2022
b0996a8
tolerance in expect equal
marouenbg Jul 1, 2022
2461c73
tolerance in expect equal
marouenbg Jul 1, 2022
dc0fbaf
tolerance in expect equal
marouenbg Jul 1, 2022
7ed40ef
tolerance in expect equal
marouenbg Jul 1, 2022
919cfd7
add sourceppi
marouenbg Jul 1, 2022
59c44a9
fixed PANDA tests
marouenbg Jul 1, 2022
6be7455
modify panda test
marouenbg Jul 5, 2022
c0bdbfa
update lioness test
marouenbg Jul 5, 2022
13aa71d
fix expect message
marouenbg Jul 5, 2022
cfbf975
update tests
marouenbg Jul 5, 2022
3ccf096
update tests
marouenbg Jul 5, 2022
865e389
update tests
marouenbg Jul 5, 2022
e0cf2ba
update tests
marouenbg Jul 5, 2022
fa29d0a
update tests
marouenbg Jul 5, 2022
e5f9d14
update tests
marouenbg Jul 5, 2022
f5567ab
reduced lioness test data
marouenbg Jul 6, 2022
003c638
reduced lioness test data
marouenbg Jul 6, 2022
8b51a84
reduced lioness test data
marouenbg Jul 6, 2022
aee2581
reduced lioness test data
marouenbg Jul 6, 2022
9e3e333
reduce test size
marouenbg Jul 6, 2022
57cd613
Merge pull request #247 from marouenbg/fix-actions
marouenbg Jul 6, 2022
29a2cd7
Merge pull request #248 from katehoffshutta/master
marouenbg Jul 6, 2022
f875255
fix desc
marouenbg Jul 7, 2022
3d7ab30
updating bioc (#250)
marouenbg Jul 7, 2022
15c4d27
Merge branch 'master' into devel
marouenbg Jul 7, 2022
257f49d
Merge branch 'master' of https://github.com/netZoo/netZooR
marouenbg Jul 7, 2022
0a81184
update citation
marouenbg Jul 7, 2022
b84122e
update citation
marouenbg Jul 7, 2022
3e50cbb
Merge branch 'master' into devel
marouenbg Jul 7, 2022
d09fde8
Merge branch 'master' of https://github.com/netZoo/netZooR
marouenbg Jul 7, 2022
c7843ad
update citation
marouenbg Jul 7, 2022
8008152
Update README.md
marouenbg Jul 15, 2022
2bf7181
Update README.md
marouenbg Jul 15, 2022
0f0b29f
Update main.yml
marouenbg Jul 15, 2022
78d2e76
Update main.yml
marouenbg Jul 15, 2022
212c893
Update .Rbuildignore
marouenbg Jul 15, 2022
210ae58
Update .Rbuildignore
marouenbg Jul 19, 2022
1217750
update lioness test
marouenbg Jul 19, 2022
b07f2aa
removed two last lioness tests
marouenbg Jul 19, 2022
8cc58ff
removed two last lioness tests
marouenbg Jul 19, 2022
38ad4e3
removed two last lioness tests
marouenbg Jul 19, 2022
e2d5a30
no saving of lioness networks
marouenbg Jul 19, 2022
a992531
no saving of lioness networks
marouenbg Jul 19, 2022
3a2d89e
no saving of lioness networks
marouenbg Jul 19, 2022
3ba0841
no saving of lioness networks
marouenbg Jul 20, 2022
fa457ae
update lioness test
marouenbg Jul 20, 2022
1302e6b
lower sizeof test
marouenbg Jul 20, 2022
e31bddc
update test data
marouenbg Jul 20, 2022
4c63d99
update test data
marouenbg Jul 20, 2022
6a1d8c5
update test data
marouenbg Jul 20, 2022
1b38fde
Merge remote-tracking branch 'upstream/devel'
marouenbg Jul 20, 2022
8eb5493
Merge remote-tracking branch 'upstream/master'
marouenbg Jul 20, 2022
4f6b9f2
reduce panda tests
marouenbg Jul 20, 2022
5250b41
remove old test data
marouenbg Jul 20, 2022
28cbe77
remove old test data
marouenbg Jul 20, 2022
15f3781
Merge branch 'master' into devel
marouenbg Jul 20, 2022
ae2b870
Merge remote-tracking branch 'upstream/master'
marouenbg Jul 20, 2022
d86b5a2
Merge remote-tracking branch 'upstream/master'
marouenbg Jul 20, 2022
0d59b71
Update main.yml
marouenbg Jul 21, 2022
8947f13
1.1.16
marouenbg Aug 16, 2022
ee77a8b
trying collapse readme (#261)
marouenbg Aug 23, 2022
29033b8
Update README.md
marouenbg Aug 23, 2022
06c7d00
Fix news file formatting
lshep Oct 31, 2022
65d77ca
bump x.y.z version to even y prior to creation of RELEASE_3_16 branch
jwokaty Nov 1, 2022
96524f8
bump x.y.z version to odd y following creation of RELEASE_3_16 branch
jwokaty Nov 1, 2022
9598c58
update biconda (#265)
marouenbg Nov 25, 2022
44631aa
add spider (#269)
marouenbg Dec 15, 2022
d1d4038
Merge branch 'master' into devel
marouenbg Dec 19, 2022
3c0ddd3
Merge remote-tracking branch 'upstream/master'
marouenbg Dec 19, 2022
5cd3d20
adding spider
marouenbg Dec 19, 2022
a9c7b26
DRAGON and unit tests work in progress (#267)
katehoffshutta Dec 21, 2022
0be1bd4
update lioness (#276)
marouenbg Jan 10, 2023
7502f3c
update lioness code (#277)
marouenbg Jan 17, 2023
a724e79
Update LIONESS.R
marouenbg Jan 17, 2023
3eb51e0
Update LIONESS.R
marouenbg Jan 17, 2023
2a50733
Update LIONESS.R
marouenbg Jan 18, 2023
84813c3
add note about the function (#279)
marouenbg Feb 10, 2023
792a26c
Update README.md
marouenbg Feb 13, 2023
ba13f6e
Update README.md
marouenbg Feb 13, 2023
f2d1270
Update sourcePPI.R
marouenbg Feb 15, 2023
cbb03ec
Update sourcePPI.R
marouenbg Feb 15, 2023
4fa7999
add details about sourcePPI (#280)
marouenbg Feb 15, 2023
b397eb6
add parallelization option to lioness (#281)
laurenhsu1 Feb 22, 2023
a720fae
fix monster error
marouenbg Mar 14, 2023
8c383da
fix monster
marouenbg Mar 14, 2023
eaf44da
Merge branch 'devel' of git.bioconductor.org:packages/netZooR into devel
marouenbg Mar 14, 2023
d13c589
1.3.2
marouenbg Mar 14, 2023
82d9482
update tests
marouenbg Mar 14, 2023
a1bf08f
update bioc verssion
marouenbg Mar 14, 2023
d9eb1e8
update monster test
marouenbg Mar 16, 2023
a140266
update argument description
marouenbg Mar 16, 2023
7774034
update argument description
marouenbg Mar 16, 2023
6bdfa1e
changed date
marouenbg Mar 16, 2023
4c5e16e
updaate docs
marouenbg Mar 19, 2023
6560bf9
update dragon verbose
marouenbg Mar 20, 2023
45dbef7
update spider
marouenbg Mar 21, 2023
53aa689
prepare for puma
marouenbg Mar 22, 2023
4598273
add puma (#270)
marouenbg Apr 12, 2023
e011aa5
Merge branch 'master' into devel
marouenbg Apr 12, 2023
babef19
Create TIGER.R (#272)
cchen22 Apr 29, 2023
56fe97b
Add lioness update (#284)
marouenbg May 30, 2023
e6c9280
Update puma (#286)
marouenbg May 31, 2023
8312861
Add TIGER (#283)
cchen22 May 31, 2023
fe1fe45
Update DESCRIPTION
marouenbg Jun 2, 2023
67d4444
Add TIGER description to README file (#288)
cchen22 Jun 2, 2023
e92699b
Merge branch 'master' into devel
marouenbg Jun 2, 2023
e1001f5
Added COBRA method (#293)
soelmicheletti Sep 2, 2023
c1123dc
Update README.md
marouenbg Sep 7, 2023
40734cd
Update TIGER (#297)
cchen22 Sep 18, 2023
9be1495
Smaller changes in COBRA (#296)
soelmicheletti Sep 18, 2023
ed3439f
Cobra docs (#298)
marouenbg Sep 25, 2023
7b87256
Update README.md
marouenbg Nov 3, 2023
dfb5875
Update main.yml
marouenbg Nov 3, 2023
4a68ab4
Update main.yml
marouenbg Nov 3, 2023
15f2146
Update main.yml
marouenbg Nov 3, 2023
db7cbf7
Fixed dependency on uchardet (#301)
taraeicher Nov 9, 2023
6c0842c
Feature: included pcor decomposition natively in cobra (#299)
soelmicheletti Nov 9, 2023
e609f15
Merge branch 'master' into devel
marouenbg Nov 18, 2023
d64817e
Update README.md
marouenbg Nov 18, 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
12 changes: 10 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -48,7 +48,7 @@ jobs:
- name: install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
cache-version: 2
extra-packages: |
any::reticulate
any::rcmdcheck
Expand All @@ -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
20 changes: 12 additions & 8 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,13 @@ 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,
cytoscape/RCy3
biocViews:
NetworkInference,
Network,
Expand All @@ -37,8 +39,8 @@ biocViews:
Transcription,
Microarray,
GraphAndNetwork
Imports:
RCy3,
Imports:
RCy3,
viridisLite,
STRINGdb,
Biobase,
Expand Down Expand Up @@ -69,9 +71,11 @@ Imports:
methods,
dplyr,
graphics,
cmdstanr,
cmdstanr,
GeneNet,
loo
loo,
rARPACK,
corpcor
License: GPL-3
Encoding: UTF-8
LazyData: false
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
82 changes: 82 additions & 0 deletions R/COBRA.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#' Run COBRA in R
#'
#' Description:
#' COBRA decomposes a (partial) gene co-expression matrix as a
#' linear combination of covariate-specific components.
#' It can be applied for batch correction, differential co-expression
#' analysis controlling for variables, and to understand the impact of
#' variables of interest to the observed co-expression.
#'
#' Inputs:
#' @param X : design matrix of size (n, q), n = number of samples, q = number of covariates
#' @param expressionData : gene expression as a matrix of size (g, n), g = number of genes
#' @param method : if pearson, the decomposition of the co-expression matrix is compouted. If pcorsh, COBRA decomposes the regularized partial co-expression
#'
#' Outputs:
#' @return psi : impact of each covariate on the eigenvalues as a matrix of size (q, n)
#' @return Q : eigenvectors corresponding to non-zero eigenvalues as a matrix of size (g, n)
#' @return D : non-zero eigenvalues as a list of length n
#' @return G : (standardized) gene expression as a matrix of size (g, n)
#'
#' @examples
#'
#' g <- 100 # number of genes
#' n <- 10 # number of samples
#' q <- 2 # number of covariates
#' X <- X <- cbind(rep(1, n), rbinom(n, 1, 0.5))
#' expressionData=matrix(rnorm(g*n, 1, 1), ncol = n, nrow = g)
#'
#' # Run COBRA algorithm
#' cobra_output <- cobra(X, expressionData)
#'
#' @export

cobra <- function(X, expressionData, method = "pearson"){

if(!(method %in% c("pearson", "pcorsh", "dragon"))){
stop("Only Pearson and pcor methods are supported. Please make sure to provide a valid method argument.")

Check warning on line 37 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L36-L37

Added lines #L36 - L37 were not covered by tests
}

numSamples <- ncol(expressionData)
if(method != "dragon"){
N <- min(ncol(expressionData),nrow(expressionData))

Check warning on line 42 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L40-L42

Added lines #L40 - L42 were not covered by tests
}
C <- 0
if(method == "pearson"){
G_star <- expressionData-rowMeans(expressionData)
expressionData <- (G_star/sqrt(rowSums(G_star^2)))
expressionData <- as.matrix(expressionData)
C <- tcrossprod(expressionData)

Check warning on line 49 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L44-L49

Added lines #L44 - L49 were not covered by tests
}
if(method == "dragon"){
if(length(expressionData) != 2){
stop("Dragon needs two layers, please provide a list of two matrices in expressionData or consider using the pcorsh argument")

Check warning on line 53 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L51-L53

Added lines #L51 - L53 were not covered by tests
}
if(dim(expressionData[[1]])[2] != dim(expressionData[[2]])[2]){
stop("Dragon layers in expressionData list must have the same number of samples")

Check warning on line 56 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L55-L56

Added lines #L55 - L56 were not covered by tests
}
C <- dragon(t(expressionData[[1]]), layer2 = t(expressionData[[2]]), pval=FALSE)$cov
N <- dim(expressionData[[1]])[2]
numSamples <- N
expressionData <- rbind(expressionData[[1]], expressionData[[2]])
print(dim(expressionData))

Check warning on line 62 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L58-L62

Added lines #L58 - L62 were not covered by tests
}
if(method == "pcorsh"){
C <- matrix(as.numeric(pcor.shrink(t(expressionData))), dim(expressionData)[1], dim(expressionData)[1])

Check warning on line 65 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L64-L65

Added lines #L64 - L65 were not covered by tests
}

eigenG <- rARPACK::eigs_sym(C,N)

Check warning on line 68 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L68

Added line #L68 was not covered by tests

Q <- eigenG$vectors
D <- diag(eigenG$values)

Check warning on line 71 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L70-L71

Added lines #L70 - L71 were not covered by tests

hatmat <- ginv(crossprod(X))%*%t(X)
Qinv <- ginv(Q)
QinvG <- Qinv%*%(expressionData)

Check warning on line 75 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L73-L75

Added lines #L73 - L75 were not covered by tests

est <- t(sapply(seq_len(nrow(hatmat)), function(hatmatRow){
diag(QinvG%*%(numSamples*diag(hatmat[hatmatRow,]))%*%t(QinvG))

Check warning on line 78 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L77-L78

Added lines #L77 - L78 were not covered by tests
}))

list(psi=est, Q=Q, D=eigenG$values, G=expressionData)

Check warning on line 81 in R/COBRA.R

View check run for this annotation

Codecov / codecov/patch

R/COBRA.R#L81

Added line #L81 was not covered by tests
}
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)})
}
Loading
Loading