extend_subnets {Corbi}R Documentation

Extend subnetworks from smaller subnetworks

Description

Extend subnetworks by pairwise overlapping two sets of smaller subnetworks.

Usage

extend_subnets(subnet1, subnet2, size = 0)

Arguments

subnet1

The matrix representing the first set of subnetworks

subnet2

The matrix representing the second set of subnetworks

size

The desired size of extended subnetworks

Details

Enumerate all possible subnetworks of desired size by pairwise overlapping two sets of subnetworks of size s1 and s2. The desired size should be between max(s1,s2)+1 and s1+s2-1. Invalid desired size will be replaced by the minimum allowed value max(s1,s2)+1.

Value

A matrix represents the extended subnetworks, in which each row represents a subnetwork.

Examples


library(Corbi)
net <- matrix(FALSE, nrow=10, ncol=10)
net[sample.int(100, 20)] <- TRUE
net <- net | t(net)
subnets <- get_subnets(net, 3)
subnets[[4]] <- extend_subnets(subnets[[3]], subnets[[2]], 4)


[Package Corbi version 0.6-2 Index]