filt_minsize: Filter sources with minsize targets

View source: R/decoupleR-pre.R

filt_minsizeR Documentation

Filter sources with minsize targets

Description

Filter sources of a net with less than minsize targets

Usage

filt_minsize(mat_f_names, network, minsize = 5)

Arguments

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.

Value

Filtered network.

Examples

inputs_dir <- system.file("testdata", "inputs", package = "decoupleR")
mat <- readRDS(file.path(inputs_dir, "mat.rds"))
net <- readRDS(file.path(inputs_dir, "net.rds"))
net <- rename_net(net, source, target, mor)
filt_minsize(rownames(mat), net, minsize = 4)

saezlab/decoupleR documentation built on Oct. 21, 2024, 8:47 a.m.