filt_minsize {decoupleR} | R Documentation |
Filter sources of a net with less than minsize targets
filt_minsize(mat_f_names, network, minsize = 5)
mat_f_names |
Feature names of mat. |
network |
Tibble or dataframe with edges and it's associated metadata. |
minsize |
Integer indicating the minimum number of targets per source. |
Filtered network.
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")) network <- rename_net(network, tf, target, mor, likelihood) filt_minsize(rownames(mat), network, minsize = 5)