iJRF (version 1.1-4)

Unweighted_Network: Compute permutation-based FDR of importance scores and return estimated interactions.

Description

This function computes permutation-based FDR of importance scores and returns interactions.

Usage

Unweighted_Network(out.iJRF,out.perm,TH)

Arguments

out.iJRF
Output from object of class iJRF.
out.perm
Output from object of class iJRF_Perm.
TH
Threshold for FDR.

Value

List of estimated interactions.

References

Petralia, F. et al (2017) A new method to study the change of miRNA-mRNA interactions due to environmental exposures, Submitted.

Petralia, F., Wang, P., Yang, J., and Tu Z. (2015) Integrative random forest for gene regulatory network inference. 31(12), i197-i205.

Petralia, F., Song, W.M., Tu, Z. and Wang, P. (2016). New method for joint network analysis reveals common and different coexpression patterns among genes and proteins in breast cancer. Journal of proteome research, 15(3), pp.743-754.

Some of the functions utilized are a modified version of functions contained in R package randomForest: A. Liaw and M. Wiener (2002). Classification and Regression by randomForest. R News 2, 18--22.

Examples

Run this code


 # --- Generate data sets
 nclasses=2               # number of data sets / classes
 n1<-n2<-20               # sample size for each data sets
 p<-5                   # number of response variables 
 M<-10                   # number of predictor variables 
 W<-abs(matrix(rnorm(M*p),M,p))    # generate sampling scores

 Res1<-matrix(rnorm(p*n1),p,n1)       # generate response for class 1
 Res2<-matrix(rnorm(p*n2),p,n2)       # generate response for class 2
 Cov1<-matrix(rnorm(M*n1),M,n1)       # generate predictors for class 1
 Cov2<-matrix(rnorm(M*n2),M,n2)       # generate predictors for class 2
 
 # --- Standardize variables to mean 0 and variance 1
  Res1 <- t(apply(Res1, 1, function(x) { (x - mean(x)) / sd(x) } ))
  Res2 <- t(apply(Res2, 1, function(x) { (x - mean(x)) / sd(x) } ))


# --- Run iJRF and obtain importance score of interactions
out.iJRF<-iJRF(X=list(Cov1,Cov2),Y=list(Res1,Res2),W=W)

# --- Run iJRF for P permutated data sets
out.perm<-iJRF_Perm(X=list(Cov1,Cov2),Y=list(Res1,Res2),W=W,P=2)

# --- Derive final networks
final.net<-Unweighted_Network(out.iJRF,out.perm,0.001)

Run the code above in your browser using DataCamp Workspace