randomize_datasource_network: Randomize a network of a particular data source.

View source: R/construct_random_networks.R

randomize_datasource_networkR Documentation

Randomize a network of a particular data source.

Description

randomize_datasource_network Randomizes a network of a data source of interest by edge swapping to preserve the degree of the nodes.

Usage

randomize_datasource_network(datasource, network)

Arguments

datasource

The name of the data source for which the interactions need to be shuffled.

network

A data frame / tibble containing gene-gene interactions (required columns: $from, $to, $source)

Value

A randomized network ($from, $to, $source)

Examples

## Not run: 
datasource_lr = lr_network$source[1]
lr_randomized_source = randomize_datasource_network(datasource_lr, lr_network)

## End(Not run)


saeyslab/nichenetr documentation built on March 26, 2024, 9:22 a.m.