idNodes: Key regulator identification

Description Usage Arguments Value Examples

View source: R/idNodes.R

Description

This function identifies key regulators of dynamic gene regulatory network

Usage

1
idNodes(network, flag, tf)

Arguments

network

network is dynamic gene regulatory network, a list of 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

'genes' is the vector of identified genes.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
##---- 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)
    genes <- matrix(0, a, (n + 1))
    rownames(genes) <- tf[which(flag == 1), 1]
    for (i in c(1:a)) {
        fflag <- flag
        fflag[which(flag == 1)[i]] <- 2
        genes[i, (1:n)] <- DGIE(network, fflag, tf)
        genes[i, (n + 1)] <- sd(genes[i, 1:n])
    }
    genes <- genes[order(genes[, (n + 1)]), ]
    return(genes)
  }

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