LINKER_runPhase2: Phase II : bipartite graphs generation

View source: R/linker_runphasetwo.R

LINKER_runPhase2R Documentation

Phase II : bipartite graphs generation

Description

Run second phase of the linker method where a bipartite graph is generated from the phase I output. A bipartite graph is a set of graph nodes decomposed into two disjoint sets such that no two graph nodes within the same set are adjacent.

Usage

LINKER_runPhase2(modules, Data, mode = "VBSR", alpha = 1 - 1e-06, FDR = 0.05)

Arguments

modules

Modules obtained from the phase I linker output.

Data

Matrix of log-normalized estimated counts of the gene expression data (Nr Genes x Nr samples)

mode

Chosen method(s) to link module eigengenes to regulators. The available options are 'VBSR', 'LASSOmin', 'LASSO1se' and 'LM'. By default, all methods are chosen.

alpha

alpha parameter if a LASSO model is chosen.

FDR

The False Discovery Rate correction used for the modules and graphs GRN uncovering. By default, 0.05.

Value

igraph object containing the related drivers and targets in the form of a bipartitive graph.

Examples


   ## We are going to proceed in the same manner as in the `linker_runphaseone()` example
   ## but we start at the end of it, loading the output from the example folder.

   linkerphase1 <- readRDS(paste0(system.file('extdata',package='TraRe'),
                              '/linker_phaseone_example.rds'))

   ## Again, we are going to load the expression matrix dataset
   lognorm_est_counts_p <- paste0(system.file('extdata', package='TraRe'),
                                 '/expression_rewiring_example.txt')
   lognorm_est_counts <- as.matrix(read.delim(lognorm_est_counts_p,
                                         header=TRUE,row.names=1))

   ## Now we proceed to call `LINKER_runPhase2()`.
   ## We first, we need to extract modules from the `LINKER_runPhase1()` output.

   modules_phaseone <- TraRe::LINKER_extract_modules(linkerphase1)

   ## Now we generate the bipartite graph from the extracted modules

  # graph <- TraRe::LINKER_runPhase2(modules = linkerphase1, Data = lognorm_est_counts,
  #                           mode='LM')



ubioinformat/TraRe documentation built on March 10, 2024, 1:11 a.m.