DGIE: DGIE score to analyze network differences

Description Usage Arguments Value Examples

View source: R/DGIE.R

Description

This function compute the DGIE score for scPADGRN.

Usage

1
DGIE(network, flag, tf)

Arguments

network

Dynamic gene regulatroy network, computed by scPADGRN, a list of numerical matrix.

flag

Indicator of functional genes, a zero-one vector of length m, where m is gene number.

tf

A vector of gene names.

Value

index

A numberical vector, stands for DGIE score for DGRN

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (network, flag, tf)
{
    a <- sum(flag)
    n <- length(network)
    links <- tf[, 1]
    index <- rep(0, n)
    links <- as.data.frame(links)
    index <- as.data.frame(index)
    fflag <- flag
    index <- rep(0, n)
    for (i in c(1:n)) {
        network[[i]] <- abs(network[[i]])
        vertice <- 100 - sum((colSums(network[[i]]) == 0) * (rowSums(network[[i]]) ==
            0))
        index[i] <- (vertice/a) * ((sum(network[[i]][fflag ==
            1, fflag == 1]) + sum(network[[i]][fflag == 1, fflag !=
            1]) + sum(network[[i]][fflag != 1, fflag == 1]))/sum(network[[i]]))
    }
    return(index)
  }

xzheng-ac/scPADGRN documentation built on July 26, 2020, 12:41 a.m.