Run_permutation: Derive importance scores for M permuted data sets.

Description Usage Arguments Value References Examples

Description

This function computes importance score for M permuted data sets. Sample labels of target genes are randomly permuted and iRafNet is implemented. Resulting importance scores can be used to derive an estimate of FDR.

Usage

1
Run_permutation(X, W, ntree, mtry,genes.name,M)

Arguments

X

(n x p) Matrix containing expression levels for n samples and p genes.

W

(p x p) Matrix containing iRafNet sampling scores. Element (i,j) contains score for regulatory relationship (i -> j). Scores must be non-negative. Larger value of sampling score corresponds to higher likelihood of gene i regulating gene j. Columns and rows of W must be in the same order as the columns of X. Sampling scores W are computed considering one prior data such as protein-protein interactions or gene expression from knock-out experiments.

ntree

Numeric value: number of trees.

mtry

Numeric value: number of predictors to be sampled at each node.

genes.name

Vector containing genes name. The order needs to match the rows of x_j.

M

Integer: total number of permutations.

Value

A matrix with I rows and M columns with I being the total number of regulations and M the number of permutations. Element (i,j) corresponds to the importance score of interaction i for permuted data j.

References

Petralia, F., Wang, P., Yang, J., Tu, Z. (2015) Integrative random forest for gene regulatory network inference, Bioinformatics, 31, 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.

A. Liaw and M. Wiener (2002). Classification and Regression by randomForest. R News 2, 18–22.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  # --- Generate data sets
  n<-20                  # sample size 
  p<-5                   # number of genes
  genes.name<-paste("G",seq(1,p),sep="")   # genes name
  M=5;            # number of permutations
 
  data<-matrix(rnorm(p*n),n,p)       # generate expression matrix
  W<-abs(matrix(rnorm(p*p),p,p))          # generate score for regulatory relationships
 
  # --- Standardize variables to mean 0 and variance 1
  data <- (apply(data, 2, function(x) { (x - mean(x)) / sd(x) } ))

  # --- Run iRafNet and obtain importance score of regulatory relationships
  out.iRafNet<-iRafNet(data,W,mtry=round(sqrt(p-1)),ntree=1000,genes.name)

  # --- Run iRafNet for M permuted data sets
  out.perm<-Run_permutation(data,W,mtry=round(sqrt(p-1)),ntree=1000,genes.name,M)

iRafNet documentation built on May 2, 2019, 6:56 a.m.