RGBM (version 1.0-7)

consider_previous_information: Remember the intermediate inferred GRN while generating the final inferred GRN

Description

This function combines the adjacency matrix A_prev obtained as a result of first_GBM_step with the adjacency matrix A obtained as a result of second_GBM_step. All the edges in the matrix A which have non-zero weights are given machine precision weights initially. We then perform a harmonic mean for each element of A_prev and A to obtain a regularized adjacency matrix (A_final). As a result of this procedure transcriptional regulations which were strong and present in both A_prev and A end up getting highest weights in A_final. We finally remove all edges whose weights are less than machine precision from A_final.

Usage

consider_previous_information(A, A_prev,real)

Arguments

A

Inferred GRN from the second_GBM_step

A_prev

Inferred GRN from the first_GBM_step

real

Numeric value 0 or 1 corresponding to simulated or real experiment respectively.

Value

Returns an adjacency matrix A_final of the form Ntfs-by-Ntargets

See Also

first_GBM_step, second_GBM_step

Examples

Run this code
# NOT RUN {
## The function is currently defined as
function (A, A_prev) 
{
  #Utilize Past Information also to not remove true positives
  A_prev[A_prev==0] <- .Machine$double.eps;
  A_prev <- transform_importance_to_weights(A_prev);
  A[A==0] <- .Machine$double.eps;
  epsilon <- 1/log(1/.Machine$double.eps);
  A <- transform_importance_to_weights(A);
  A_final <- 2*A*A_prev/(A+A_prev);
  A_final <- A_final - epislon;
  A_final[A_final<0] <- 0.0;
  return(A_final);
}
# }

Run the code above in your browser using DataCamp Workspace