Filter sources of a net with less than minsize targets
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)
#> # A tibble: 4 × 4
#> source target mor likelihood
#> <chr> <chr> <dbl> <dbl>
#> 1 T3 G06 -0.5 1
#> 2 T3 G07 -3 1
#> 3 T3 G08 -1 1
#> 4 T3 G11 1 1