Code Monkey home page Code Monkey logo

jdinac's Introduction

JDINAC: joint density-based non-parametric differential interaction network analysis and classification using high-dimensional sparse omics data


Cite: Ji, J., He, D., Feng, Y., He, Y., Xue, F., & Xie, L. (2017). JDINAC: joint density-based non-parametric differential interaction network analysis and classification using high-dimensional sparse omics data. Bioinformatics. doi: 10.1093/bioinformatics/btx360


Usage

R code avaiable from https://github.com/jijiadong/JDINAC/blob/master/jdinac.r

jdinac(EDGE, classLabel, DataFit, DataPre, zFit=NULL, zPre=NULL, nsplit=10, nfolds=5)

Input:

  • DataFit, DataPre: data matrices containing one sample per row, one variable per column. DataFit: training data, DataPre: prediction data.
  • zFit, zPre: covariate in training data and prediction data respectively.
  • classLabel: must be 0 or 1, e.g. 1 for cases and 0 for controls.
  • nsplit: randomly split the dataset 2*nsplit times.
  • nfolds: number of folds for Cross-validation.
  • EDGE: array indices. which edge will be tested.

Output

  • yPre: predicted value of response.
  • Eset: differential edge set; the first two columns are the array indices; the edge between row-th variable and col-th variable. The 3rd column (numb) is the differential dependency weight; not normalized.

Example

Run the R code jdinac.r first.

library(mvtnorm)
Sigma0 <- 0.5* (-1)^abs(outer(1:10,1:10,"-"))
Sigma1 <- array(0.5,dim=c(10,10))
adjM <- array(1,dim=c(10,10))
adjM[lower.tri(adjM,diag=T)] <- 0
adjM[1,5] <- adjM[3,6] <- adjM[4,8] <- 0
adjM
##       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
##  [1,]    0    1    1    1    0    1    1    1    1     1
##  [2,]    0    0    1    1    1    1    1    1    1     1
##  [3,]    0    0    0    1    1    0    1    1    1     1
##  [4,]    0    0    0    0    1    1    1    0    1     1
##  [5,]    0    0    0    0    0    1    1    1    1     1
##  [6,]    0    0    0    0    0    0    1    1    1     1
##  [7,]    0    0    0    0    0    0    0    1    1     1
##  [8,]    0    0    0    0    0    0    0    0    1     1
##  [9,]    0    0    0    0    0    0    0    0    0     1
## [10,]    0    0    0    0    0    0    0    0    0     0

EDGE <- which(adjM!=0, arr.ind=T)
head(EDGE)
##      row col
## [1,]   1   2
## [2,]   1   3
## [3,]   2   3
## [4,]   1   4
## [5,]   2   4
## [6,]   3   4

set.seed(2017)
size0 <- size1 <- 50
class0 <- rmvnorm( n = size0, sigma = Sigma0,method = "svd")
class1 <- rmvnorm( n = size1, sigma = Sigma1,method = "svd" ) 
dataset <- rbind(class0,class1)
classLabel <- c(rep(0,size0),rep(1,size1))

difnet <- jdinac(EDGE=EDGE,classLabel=classLabel,DataFit=dataset,DataPre=dataset,nsplit=10,nfolds=5)
head(difnet$yPre)
## [1] 3.893804e-01 3.459244e-08 9.624137e-07 8.148533e-09 4.774174e-07
## [6] 3.384799e-05

head(difnet$Eset)
##    row col numb
## 1    1   2   20
## 3    2   3   16
## 5    2   4   14
## 6    3   4   13
## 11   2   6   13
## 21   2   8   13

jdinac's People

Contributors

jijiadong avatar

Watchers

James Cloos avatar Leo Liu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.