network_from_tests: Create network from edges statistical tests

View source: R/fct_edge_testing.R

network_from_testsR Documentation

Create network from edges statistical tests

Description

Create network from edges statistical tests

Usage

network_from_tests(links, fdr)

Arguments

links

dataframe of the network edges and associated pvalues, as in the links attribute of the test_edges() method result.

fdr

threshold value such as all edges with adjusted pvalues lesser than the argument are be discarded for the final network construction

Value

Oriented weighted network as an igraph object

Examples

## Not run: 
data("abiotic_stresses")
data("gene_annotations")
data("regulators_per_organism")

genes <- get_locus(abiotic_stresses$heat_DEGs)
regressors <- intersect(genes, 
                        regulators_per_organism$`Arabidopsis thaliana`)

data <- aggregate_splice_variants(abiotic_stresses$normalized_counts)

r <- DIANE::group_regressors(data, genes, regressors)

mat <- DIANE::network_inference(r$counts, 
                                conds = abiotic_stresses$conditions, 
                                targets = r$grouped_genes,
                                regressors = r$grouped_regressors, 
                                importance_metric = "MSEincrease_oob", 
                                verbose = TRUE) 
res <- DIANE::test_edges(mat, normalized_counts = r$counts, density = 0.02,
                        nGenes = length(r$grouped_genes), 
                        nRegulators = length(r$grouped_regressors), 
                        nTrees = 1000, verbose = TRUE)
net <- DIANE::network_from_tests(res$links, fdr = 0.01)

## End(Not run)

OceaneCsn/DIANE documentation built on Jan. 10, 2024, 6:43 p.m.