intersect_regulons {decoupleR} | R Documentation |
Keep only edges which its target genes belong to the expression matrix.
intersect_regulons(mat, network, .source, .target, minsize)
mat |
Matrix to evaluate (e.g. expression matrix).
Target nodes in rows and conditions in columns.
|
network |
Tibble or dataframe with edges and it's associated metadata. |
.source |
Column with source nodes. |
.target |
Column with target nodes. |
minsize |
Minimum number of targets per source allowed. |
Filtered tibble.
inputs_dir <- system.file("testdata", "inputs", package = "decoupleR") mat <- readRDS(file.path(inputs_dir, "input-expr_matrix.rds")) network <- readRDS(file.path(inputs_dir, "input-dorothea_genesets.rds")) intersect_regulons(mat, network, tf, target, minsize=5)